From acac4f819ccafa6f6bb945626f2e21ec2b75074b Mon Sep 17 00:00:00 2001 From: Bryan Forbes Date: Thu, 1 Apr 2010 01:09:52 -0500 Subject: Cleaned up Makefile.am. Added the cython m4 files. Cleaned up afc.pxi. Make sure the event callback and installation proxy callback aquire the GIL. Implemented some cleanup before the error handlers raise. --- cython/property_list_client.pxi | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'cython/property_list_client.pxi') 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): self.handle_error(self._send(n._c_node)) cpdef object receive(self): - cdef plist.plist_t c_node = NULL - self.handle_error(self._receive(&c_node)) + cdef: + plist.plist_t c_node = NULL + int16_t err + err = self._receive(&c_node) + try: + self.handle_error(err) + except BaseError, e: + if c_node != NULL: + plist_free(c_node) + raise return plist.plist_t_to_node(c_node) -- cgit v1.1-32-gdbae