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
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:
ctypedef uint64_t Tid
ctypedef uint64_t Oid
......
......@@ -26,6 +26,7 @@
# See _wcfs.pxd for package overview.
from golang cimport pychan, pyerror, nil
from golang cimport io
cdef extern from *:
ctypedef bint cbool "bool"
......@@ -202,7 +203,7 @@ cdef class PyWatchLink:
with nogil:
err = wlink_recvReq_pyexc(pywlink.wlink, pyctx.ctx, &pyreq.pinreq)
if err.eq(EOF):
if err.eq(io.EOF):
return None
if err != nil:
raise pyerr(err)
......
......@@ -54,6 +54,7 @@
#include <golang/errors.h>
#include <golang/fmt.h>
#include <golang/io.h>
#include <algorithm>
#include <string>
......
......@@ -24,6 +24,7 @@
#include <golang/libgolang.h>
#include <golang/errors.h>
#include <golang/fmt.h>
#include <golang/io.h>
using namespace golang;
#include <inttypes.h>
......@@ -35,14 +36,6 @@ using namespace golang;
#include <memory>
// io::
namespace io {
const global<error> EOF_ = errors::New("EOF");
const global<error> ErrUnexpectedEOF = errors::New("unexpected EOF");
} // io::
// os::
namespace os {
......
......@@ -51,16 +51,6 @@ using std::tie;
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/stat.h>
#include <fcntl.h>
......
......@@ -23,6 +23,7 @@
#include <golang/errors.h>
#include <golang/fmt.h>
#include <golang/io.h>
#include <golang/strings.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