summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarinus Schraal <foser@gentoo.org>2004-09-20 22:23:34 +0000
committerMarinus Schraal <foser@gentoo.org>2004-09-20 22:23:34 +0000
commit61984ea225ee5f7a69785fd67b687cbd6a75df1b (patch)
tree0c6d221528aa2982e38c3aebd2f5abe574dcfbaf /sys-apps/dbus/files
parentVersion bump (diff)
downloadhistorical-61984ea225ee5f7a69785fd67b687cbd6a75df1b.tar.gz
historical-61984ea225ee5f7a69785fd67b687cbd6a75df1b.tar.bz2
historical-61984ea225ee5f7a69785fd67b687cbd6a75df1b.zip
add patch
Diffstat (limited to 'sys-apps/dbus/files')
-rw-r--r--sys-apps/dbus/files/dbus-0.22-python_int64.patch143
-rw-r--r--sys-apps/dbus/files/digest-dbus-0.22-r11
2 files changed, 144 insertions, 0 deletions
diff --git a/sys-apps/dbus/files/dbus-0.22-python_int64.patch b/sys-apps/dbus/files/dbus-0.22-python_int64.patch
new file mode 100644
index 000000000000..b9532d4cc683
--- /dev/null
+++ b/sys-apps/dbus/files/dbus-0.22-python_int64.patch
@@ -0,0 +1,143 @@
+Index: python/dbus_bindings.pyx.in
+===================================================================
+RCS file: /cvs/dbus/dbus/python/dbus_bindings.pyx.in,v
+retrieving revision 1.14
+diff -u -p -r1.14 dbus_bindings.pyx.in
+--- python/dbus_bindings.pyx.in 28 Jul 2004 18:14:55 -0000 1.14
++++ python/dbus_bindings.pyx.in 1 Sep 2004 17:20:43 -0000
+@@ -455,6 +455,10 @@ cdef class MessageIter:
+ retval = self.get_int32()
+ elif arg_type == TYPE_UINT32:
+ retval = self.get_uint32()
++ elif arg_type == TYPE_INT64:
++ retval = self.get_int64()
++ elif arg_type == TYPE_UINT64:
++ retval = self.get_uint64()
+ elif arg_type == TYPE_DOUBLE:
+ retval = self.get_double()
+ elif arg_type == TYPE_BYTE:
+@@ -474,6 +478,10 @@ cdef class MessageIter:
+ retval = self.get_int32_array()
+ elif array_type == TYPE_UINT32:
+ retval = self.get_uint32_array()
++ elif array_type == TYPE_INT64:
++ retval = self.get_int64_array()
++ elif array_type == TYPE_UINT64:
++ retval = self.get_uint64_array()
+ elif array_type == TYPE_DOUBLE:
+ retval = self.get_double_array()
+ else:
+@@ -529,6 +537,12 @@ cdef class MessageIter:
+ def get_uint32(self):
+ return dbus_message_iter_get_uint32(self.iter)
+
++ def get_int64(self):
++ return dbus_message_iter_get_int64(self.iter)
++
++ def get_uint64(self):
++ return dbus_message_iter_get_uint64(self.iter)
++
+ def get_double(self):
+ return dbus_message_iter_get_double(self.iter)
+
+@@ -574,6 +588,26 @@ cdef class MessageIter:
+ python_list.append(retval[i])
+ return python_list
+
++ def get_int64_array(self):
++ cdef int len
++ cdef dbus_int64_t *retval
++ cdef int i
++ dbus_message_iter_get_int64_array(self.iter, &retval, <int*>&len)
++ python_list = []
++ for i from 0 <= i < len:
++ python_list.append(retval[i])
++ return python_list
++
++ def get_uint64_array(self):
++ cdef int len
++ cdef dbus_uint64_t *retval
++ cdef int i
++ dbus_message_iter_get_uint64_array(self.iter, &retval, <int*>&len)
++ python_list = []
++ for i from 0 <= i < len:
++ python_list.append(retval[i])
++ return python_list
++
+ def get_double_array(self):
+ cdef int len
+ cdef double *retval
+@@ -615,6 +649,8 @@ cdef class MessageIter:
+ retval = self.append_boolean(value)
+ elif value_type == int:
+ retval = self.append_int32(value)
++ elif value_type == long:
++ retval = self.append_int64(value)
+ elif value_type == str:
+ retval = self.append_string(value)
+ elif value_type == float:
+@@ -631,6 +667,8 @@ cdef class MessageIter:
+ self.append_string_array(value)
+ elif list_type == int:
+ self.append_int32_array(value)
++ elif list_type == long:
++ self.append_int64_array(value)
+ elif list_type == float:
+ self.append_double_array(value)
+ elif isinstance(value[0], ObjectPath):
+@@ -665,6 +703,12 @@ cdef class MessageIter:
+ def append_uint32(self, value):
+ return dbus_message_iter_append_uint32(self.iter, value)
+
++ def append_int64(self, value):
++ return dbus_message_iter_append_int64(self.iter, value)
++
++ def append_uint64(self, value):
++ return dbus_message_iter_append_uint64(self.iter, value)
++
+ def append_double(self, value):
+ return dbus_message_iter_append_double(self.iter, value)
+
+@@ -677,7 +721,8 @@ cdef class MessageIter:
+ def append_object_path(self, value):
+ return dbus_message_iter_append_object_path(self.iter, value)
+
+- # FIXME: append_array, append_boolean_array, append_uint32_array
++ # FIXME: append_array, append_boolean_array, append_uint32_array,
++ # append_uint64_array
+
+ def append_dict(self, python_dict):
+ cdef DBusMessageIter c_dict_iter
+@@ -720,6 +765,19 @@ cdef class MessageIter:
+ value[i] = item
+ return dbus_message_iter_append_int32_array(self.iter, value, length)
+
++ def append_int64_array(self, python_list):
++ cdef dbus_int64_t *value
++ cdef int length
++ cdef int i
++ length = len(python_list)
++ value = <dbus_int64_t*>malloc(length * sizeof(dbus_int64_t))
++ for i from 0 <= i < length:
++ item = python_list[i]
++ if type(item) != int:
++ raise TypeError
++ value[i] = item
++ return dbus_message_iter_append_int64_array(self.iter, value, length)
++
+ def append_double_array(self, python_list):
+ cdef double *value
+ cdef int length
+@@ -855,6 +913,12 @@ cdef class Message:
+ elif type == TYPE_UINT32:
+ num = iter.get_uint32()
+ arg = 'uint32:%u\n' % (num)
++ elif type == TYPE_INT64:
++ num = iter.get_int64()
++ arg = 'int64:%d\n' % (num)
++ elif type == TYPE_UINT64:
++ num = iter.get_uint64()
++ arg = 'uint64:%u\n' % (num)
+ elif type == TYPE_DOUBLE:
+ num = iter.get_double()
+ arg = 'double:%f\n' % (num)
diff --git a/sys-apps/dbus/files/digest-dbus-0.22-r1 b/sys-apps/dbus/files/digest-dbus-0.22-r1
new file mode 100644
index 000000000000..d2af6e21be95
--- /dev/null
+++ b/sys-apps/dbus/files/digest-dbus-0.22-r1
@@ -0,0 +1 @@
+MD5 6b1c2476ea8b82dd9fb7f29ef857cb9f dbus-0.22.tar.gz 1248780