dbus/python dbus_bindings.pyx,1.3,1.4

John Palmieri johnp at freedesktop.org
Thu Aug 25 21:23:35 PDT 2005


Update of /cvs/dbus/dbus/python
In directory gabe:/tmp/cvs-serv1991/python

Modified Files:
	dbus_bindings.pyx 
Log Message:
* s/Message(_create=0)/EmptyMessage everywhere else

* test/python/test-{server|client}.py: add the python/.libs directory
  to the lookup path so dbus_bindings and dbus_glib_bindings don't
  get picked up from the system


Index: dbus_bindings.pyx
===================================================================
RCS file: /cvs/dbus/dbus/python/dbus_bindings.pyx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- dbus_bindings.pyx	26 Aug 2005 03:09:59 -0000	1.3
+++ dbus_bindings.pyx	26 Aug 2005 04:23:33 -0000	1.4
@@ -208,7 +208,10 @@
         tup = <object>user_data
         assert (type(tup) == list)
         function = tup[0]
-        message = Message(_create=0)
+        message = EmptyMessage()
+
+	#we don't own the message so we need to ref it
+        dbus_message_ref(msg)
         message._set_msg(msg)
         conn = Connection()
         conn.__cinit__(None, connection)  
@@ -274,7 +277,7 @@
 
     def borrow_message(self):
         cdef Message m
-        m = Message(_create=0)
+        m = EmptyMessage()
         m._set_msg(dbus_connection_borrow_message(self.conn))
         return m
     
@@ -295,7 +298,7 @@
  
         msg = dbus_connection_pop_message(self.conn)
         if msg != NULL:
-            m = Message(_create=0)
+            m = EmptyMessage()
             m._set_msg(msg)
         else:
             m = None
@@ -491,7 +494,7 @@
     (reply_handler, error_handler) = <object>user_data
    
     dbus_message = dbus_pending_call_steal_reply(pending_call)
-    message = Message(_create=0)
+    message = EmptyMessage()
     message._set_msg(dbus_message)
 
     type = message.get_type()
@@ -542,7 +545,7 @@
 
     def get_reply(self):
         cdef Message message
-        message = Message(_create=0)
+        message = EmptyMessage()
         message._set_msg(dbus_pending_call_steal_reply(self.pending_call))
         return message
 



More information about the dbus-commit mailing list