Commit 0a8fcd9d authored by Kirill Smelkov's avatar Kirill Smelkov

X wcfs/client: Move EOF -> pygolang

parent f7b54ca4
...@@ -35,11 +35,6 @@ from libcpp.utility cimport pair ...@@ -35,11 +35,6 @@ from libcpp.utility cimport pair
from libcpp.vector cimport vector from libcpp.vector cimport vector
# XXX -> pygolang
cdef extern from "wcfs/client/wcfs_misc.h" namespace "io" nogil:
error EOF "io::EOF_"
error ErrUnexpectedEOF
cdef extern from "wcfs/client/wcfs_misc.h" namespace "zodb" nogil: cdef extern from "wcfs/client/wcfs_misc.h" namespace "zodb" nogil:
ctypedef uint64_t Tid ctypedef uint64_t Tid
ctypedef uint64_t Oid ctypedef uint64_t Oid
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
# See _wcfs.pxd for package overview. # See _wcfs.pxd for package overview.
from golang cimport pychan, pyerror, nil from golang cimport pychan, pyerror, nil
from golang cimport io
cdef extern from *: cdef extern from *:
ctypedef bint cbool "bool" ctypedef bint cbool "bool"
...@@ -202,7 +203,7 @@ cdef class PyWatchLink: ...@@ -202,7 +203,7 @@ cdef class PyWatchLink:
with nogil: with nogil:
err = wlink_recvReq_pyexc(pywlink.wlink, pyctx.ctx, &pyreq.pinreq) err = wlink_recvReq_pyexc(pywlink.wlink, pyctx.ctx, &pyreq.pinreq)
if err.eq(EOF): if err.eq(io.EOF):
return None return None
if err != nil: if err != nil:
raise pyerr(err) raise pyerr(err)
......
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
#include <golang/errors.h> #include <golang/errors.h>
#include <golang/fmt.h> #include <golang/fmt.h>
#include <golang/io.h>
#include <algorithm> #include <algorithm>
#include <string> #include <string>
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include <golang/libgolang.h> #include <golang/libgolang.h>
#include <golang/errors.h> #include <golang/errors.h>
#include <golang/fmt.h> #include <golang/fmt.h>
#include <golang/io.h>
using namespace golang; using namespace golang;
#include <inttypes.h> #include <inttypes.h>
...@@ -35,14 +36,6 @@ using namespace golang; ...@@ -35,14 +36,6 @@ using namespace golang;
#include <memory> #include <memory>
// io::
namespace io {
const global<error> EOF_ = errors::New("EOF");
const global<error> ErrUnexpectedEOF = errors::New("unexpected EOF");
} // io::
// os:: // os::
namespace os { namespace os {
......
...@@ -51,16 +51,6 @@ using std::tie; ...@@ -51,16 +51,6 @@ using std::tie;
using std::vector; using std::vector;
// io:: XXX -> pygolang
namespace io {
extern const global<error> EOF_;
extern const global<error> ErrUnexpectedEOF;
} // io::
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.h> #include <fcntl.h>
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include <golang/errors.h> #include <golang/errors.h>
#include <golang/fmt.h> #include <golang/fmt.h>
#include <golang/io.h>
#include <golang/strings.h> #include <golang/strings.h>
#include <string.h> #include <string.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment