Commit f89760d1 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 049b11af
...@@ -23,9 +23,43 @@ ...@@ -23,9 +23,43 @@
# XXX doc # XXX doc
from libcpp cimport nullptr_t, nullptr as nil
cdef extern from *:
ctypedef bint cbool "bool"
cdef extern from "wcfs_misc.h" nogil:
cppclass error:
cbool operator==(nullptr_t) const
cbool operator!=(nullptr_t) const
cbool operator==(const error&) const
cbool operator!=(const error&) const
cdef extern from "wcfs_watchlink.h" nogil:
cppclass WatchLink:
error close()
from golang cimport topyexc
cdef class PyWatchLink: cdef class PyWatchLink:
pass cdef WatchLink *wlink
def close(PyWatchLink pywlink):
with nogil:
err = wlink_close_pyexc(pywlink.wlink)
if err != nil:
raise RuntimeError(err) # XXX exc class?
cdef class PyPinReq: cdef class PyPinReq:
pass pass
# ---- misc ----
cdef nogil:
error wlink_close_pyexc(WatchLink *wlink) except +topyexc:
return wlink.close()
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