[Xcb] xpyb buglet

Eamon Walsh ewalsh.mailinglists at gmail.com
Mon Aug 2 16:41:57 PDT 2010


On 7/29/2010 4:25 AM, Julien Danjou wrote:
> On Thu, Jul 29 2010, Aldo Cortesi wrote:
>
>   
>> It looks like there's a typo that breaks compilation in the xpyb
>> codebase. Patch below.
>>     
> Applied, thanks.
>   

Actually this is still broken, the first argument is of type
xcb_connection_t, not xpybConn.  Also, if the client previously called
xcb_disconnect, the connection will be NULL.  I have pushed the patch below.

Been awhile since the last xpyb release, I have a few build fixes to
push, then I will tag a new release.

diff --git a/src/cookie.c b/src/cookie.c
index 46bf645..9994e51 100644
--- a/src/cookie.c
+++ b/src/cookie.c
@@ -23,7 +23,9 @@ xpybCookie_new(PyTypeObject *self, PyObject *args, PyObject *kw)
 static void
 xpybCookie_dealloc(xpybCookie *self)
 {
-    xcb_discard_reply(self, self->cookie.sequence);
+    if (self->conn->conn)
+	xcb_discard_reply(self->conn->conn, self->cookie.sequence);
+
     Py_CLEAR(self->reply_type);
     Py_CLEAR(self->request);
     Py_CLEAR(self->conn);





More information about the Xcb mailing list