[Xcb] [PATCH] Rename response type field to response_type

Julien Danjou julien at danjou.info
Tue Feb 2 07:35:30 PST 2010


Signed-off-by: Julien Danjou <julien at danjou.info>
---

Problem is here in xproto.py:

class GetPropertyReply(xcb.Reply): 
[...]
        (self.format, self.type, self.bytes_after, self.value_len,) = unpack_from('xB2x4xIII12x', self, count) 

Yeah, assigning self.type fails!

To fix, I rename 'type' as defined in C object to response_type,
which is used nowhere and should not be used anywhere in the future.

 src/response.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/response.c b/src/response.c
index bfd6205..abaad77 100644
--- a/src/response.c
+++ b/src/response.c
@@ -26,7 +26,7 @@ xpybResponse_getattro(PyObject *self, PyObject *obj)
     if (PyObject_AsReadBuffer(self, (const void **)&data, &size) < 0)
 	return NULL;
 
-    if (strcmp(name, "type") == 0)
+    if (strcmp(name, "response_type") == 0)
 	return Py_BuildValue("B", data->response_type);
     if (strcmp(name, "sequence") == 0)
 	return Py_BuildValue("H", data->sequence);
-- 
1.6.6.1



More information about the Xcb mailing list