Commit f21a2d91 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 1b4bee0e
...@@ -93,12 +93,11 @@ cdef extern from "wcfs.h" nogil: ...@@ -93,12 +93,11 @@ cdef extern from "wcfs.h" nogil:
pair[Conn, error] connect(Tid at) pair[Conn, error] connect(Tid at)
cppclass _Conn: cppclass _Conn:
# XXX error close()
pass
cppclass Conn (refptr[_Conn]): cppclass Conn (refptr[_Conn]):
# XXX # Conn.X = Conn->X in C++
pass error close "_ptr()->close" ()
cdef class PyWCFS: cdef class PyWCFS:
...@@ -131,6 +130,14 @@ cdef class PyConn: ...@@ -131,6 +130,14 @@ cdef class PyConn:
def __dealloc__(PyConn pywconn): def __dealloc__(PyConn pywconn):
pywconn.wconn = nil pywconn.wconn = nil
def close(PyConn pywconn):
with nogil:
err = pywconn.wconn.close()
if err != nil:
raise pyerr(err)
# XXX resync
cdef class PyWatchLink: cdef class PyWatchLink:
cdef WatchLink wlink cdef WatchLink wlink
......
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