summaryrefslogtreecommitdiffstats
path: root/cython/property_list_client.pxi
diff options
context:
space:
mode:
Diffstat (limited to 'cython/property_list_client.pxi')
-rw-r--r--cython/property_list_client.pxi12
1 files changed, 10 insertions, 2 deletions
diff --git a/cython/property_list_client.pxi b/cython/property_list_client.pxi
index 874f2b5..2f9ce76 100644
--- a/cython/property_list_client.pxi
+++ b/cython/property_list_client.pxi
@@ -4,8 +4,16 @@ cdef class PropertyListClient(Base):
4 self.handle_error(self._send(n._c_node)) 4 self.handle_error(self._send(n._c_node))
5 5
6 cpdef object receive(self): 6 cpdef object receive(self):
7 cdef plist.plist_t c_node = NULL 7 cdef:
8 self.handle_error(self._receive(&c_node)) 8 plist.plist_t c_node = NULL
9 int16_t err
10 err = self._receive(&c_node)
11 try:
12 self.handle_error(err)
13 except BaseError, e:
14 if c_node != NULL:
15 plist_free(c_node)
16 raise
9 17
10 return plist.plist_t_to_node(c_node) 18 return plist.plist_t_to_node(c_node)
11 19