Commit 9910a23b authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 0a7da733
......@@ -37,12 +37,16 @@ cdef extern from "wcfs_misc.h" nogil:
cbool operator==(const error&) const
cbool operator!=(const error&) const
cdef extern from "wcfs_misc.h" namespace "context" nogil:
cppclass IContext "Context":
pass
cdef extern from "wcfs_watchlink.h" nogil:
cppclass WatchLink:
error close()
#error recvReq(ctx, PinReq *rx_into)
pair[string, error] sendReq(ctx, const string &req)
pair[string, error] sendReq(IContext *ctx, const string &req)
ctypedef WatchLink *pWatchLink # https://github.com/cython/cython/issues/534
......@@ -87,6 +91,7 @@ cdef class PyWatchLink:
# XXX recvReq
#def sendReq(PyWatchLink pywlink, IContext *ctx, string req): # -> reply(string)
def sendReq(PyWatchLink pywlink, ctx, string req): # -> reply(string)
with nogil:
_ = wlink_sendReq_pyexc(pywlink.wlink, ctx, req)
......@@ -115,5 +120,5 @@ cdef nogil:
error wlink_close_pyexc(WatchLink *wlink) except +topyexc:
return wlink.close()
pair[string, error] wlink_sendReq_pyexc(WatchLink *wlink, ctx, const string &req) except +topyexc:
pair[string, error] wlink_sendReq_pyexc(WatchLink *wlink, IContext *ctx, const string &req) except +topyexc:
return wlink.sendReq(ctx, req)
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