From 68c63cc1382326e7f0cb4e6bd863427f9069ca05 Mon Sep 17 00:00:00 2001 From: Bryan Forbes Date: Wed, 17 Mar 2010 10:27:44 -0500 Subject: Added base class for more efficient error handling. --- cython/property_list_client.pxi | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 cython/property_list_client.pxi (limited to 'cython/property_list_client.pxi') diff --git a/cython/property_list_client.pxi b/cython/property_list_client.pxi new file mode 100644 index 0000000..2689658 --- /dev/null +++ b/cython/property_list_client.pxi @@ -0,0 +1,13 @@ +cdef class PropertyListClient(Base): + cpdef send(self, plist.Node node): + cdef plist.Node n = node + self.handle_error(self._send(n._c_node)) + + cpdef plist.Node receive(self): + cdef plist.plist_t c_node = NULL + self.handle_error(self._receive(&c_node)) + + return plist.plist_t_to_node(c_node) + + cdef inline int16_t _send(self, plist.plist_t node): pass + cdef inline int16_t _receive(self, plist.plist_t* c_node): pass -- cgit v1.1-32-gdbae