[patch] python bindings
David Zeuthen
david@fubar.dk
Wed, 15 Oct 2003 01:46:34 +0200
--=-+dEuzJVPivfDvEpW8PZE
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Attached is a patch that will fix the python bindings on dbus HEAD. I
guess they stopped working when the types in dbus/dbus-protocol.h was
changed.
Thanks,
David
--=-+dEuzJVPivfDvEpW8PZE
Content-Disposition: attachment; filename=dbus-fix-python-bindings.patch
Content-Type: text/x-patch; name=dbus-fix-python-bindings.patch; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Index: ChangeLog
===================================================================
RCS file: /cvs/dbus/dbus/ChangeLog,v
retrieving revision 1.422
diff -u -r1.422 ChangeLog
--- ChangeLog 14 Oct 2003 05:16:56 -0000 1.422
+++ ChangeLog 14 Oct 2003 23:32:44 -0000
@@ -1,3 +1,11 @@
+2003-10-14 David Zeuthen <david@fubar.dk>
+
+ * python/dbus_bindings.pyx.in (MessageIter.get): fixed typo in
+ argtype to arg_type when raising unknown arg type exception.
+
+ * python/dbus_bindings.pyx.in: Changed type list to reflect the
+ changes in dbus-protocol.h so the bindings actually work.
+
2003-10-14 Havoc Pennington <hp@redhat.com>
* bus/connection.c: implement pending reply tracking using
Index: python/dbus_bindings.pyx.in
===================================================================
RCS file: /cvs/dbus/dbus/python/dbus_bindings.pyx.in,v
retrieving revision 1.2
diff -u -r1.2 dbus_bindings.pyx.in
--- python/dbus_bindings.pyx.in 30 Sep 2003 02:40:49 -0000 1.2
+++ python/dbus_bindings.pyx.in 14 Oct 2003 23:32:46 -0000
@@ -404,7 +404,7 @@
def get(self):
arg_type = self.get_arg_type()
-
+
if arg_type == TYPE_INVALID:
raise TypeError, 'Invalid arg type in MessageIter'
elif arg_type == TYPE_STRING:
@@ -429,7 +429,7 @@
else:
raise TypeError, "Unknown array type %d in MessageIter" % (array_type)
else:
- raise TypeError, 'Unknown arg type %d in MessageIter' % (argtype)
+ raise TypeError, "Unknown arg type %d in MessageIter" % (arg_type)
return retval
@@ -569,7 +569,7 @@
(MESSAGE_TYPE_INVALID, MESSAGE_TYPE_METHOD_CALL, MESSAGE_TYPE_METHOD_RETURN, MESSAGE_TYPE_ERROR, MESSAGE_TYPE_SIGNAL) = range(5)
-(TYPE_INVALID, TYPE_NIL, TYPE_BYTE, TYPE_BOOLEAN, TYPE_INT32, TYPE_UINT32, TYPE_INT64, TYPE_UINT64, TYPE_DOUBLE, TYPE_STRING, TYPE_NAMED, TYPE_ARRAY, TYPE_DICT, TYPE_OBJECT_PATH) = range(14)
+(TYPE_INVALID, TYPE_NIL, TYPE_BYTE, TYPE_BOOLEAN, TYPE_INT32, TYPE_UINT32, TYPE_INT64, TYPE_UINT64, TYPE_DOUBLE, TYPE_STRING, TYPE_NAMED, TYPE_ARRAY, TYPE_DICT, TYPE_OBJECT_PATH) = (0, 118, 121, 98, 105, 117, 120, 116, 100, 115, 110, 97, 99, 111)
cdef class Message:
cdef DBusMessage *msg
--=-+dEuzJVPivfDvEpW8PZE--