dbus/python dbus.py, 1.12, 1.13 dbus_bindings.pyx.in, 1.15,
1.16 extract.py, 1.2, 1.3
John Palmieri
johnp at freedesktop.org
Wed Dec 22 16:50:39 PST 2004
Update of /cvs/dbus/dbus/python
In directory gabe:/tmp/cvs-serv21434/python
Modified Files:
dbus.py dbus_bindings.pyx.in extract.py
Log Message:
* patch from Rob Taylor <robtaylor at fastmail.fm>
- wrap bus_get_unix_user method in low level bindings
- add get_unix_user method to the Bus class
- fix extract.py so it can handle unsigned long return types
Index: dbus.py
===================================================================
RCS file: /cvs/dbus/dbus/python/dbus.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- dbus.py 28 Jul 2004 18:14:55 -0000 1.12
+++ dbus.py 23 Dec 2004 00:50:37 -0000 1.13
@@ -99,6 +99,10 @@
def get_connection(self):
"""Get the dbus_bindings.Connection object associated with this Bus"""
return self._connection
+
+ def get_unix_user(self, service_name):
+ """Get the unix user for the given service_name on this Bus"""
+ return dbus_bindings.bus_get_unix_user(self._connection, service_name)
def _get_match_rule(self, signal_name, interface, service, path):
match_rule = "type='signal'"
Index: dbus_bindings.pyx.in
===================================================================
RCS file: /cvs/dbus/dbus/python/dbus_bindings.pyx.in,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- dbus_bindings.pyx.in 16 Sep 2004 19:56:26 -0000 1.15
+++ dbus_bindings.pyx.in 23 Dec 2004 00:50:37 -0000 1.16
@@ -1132,6 +1132,19 @@
conn = connection._get_conn()
return dbus_bus_get_base_service(conn)
+def bus_get_unix_user(Connection connection, service_name):
+ cdef DBusError error
+ dbus_error_init(&error)
+ cdef int retval
+ cdef DBusConnection *conn
+
+ conn = connection._get_conn()
+ retval = dbus_bus_get_unix_user(conn, service_name, &error)
+
+ if dbus_error_is_set(&error):
+ raise DBusException, error.message
+ return retval
+
def bus_register(Connection connection):
cdef DBusError error
dbus_error_init(&error)
Index: extract.py
===================================================================
RCS file: /cvs/dbus/dbus/python/extract.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- extract.py 30 Sep 2003 02:40:49 -0000 1.2
+++ extract.py 23 Dec 2004 00:50:37 -0000 1.3
@@ -108,7 +108,7 @@
return typedefs
proto_pat = re.compile(r"""
-(?P<ret>(-|\w|\&|\*)+\s*) # return type
+(?P<ret>(-|\w|\&|\*|\s)+\s*) # return type
\s+ # skip whitespace
(?P<func>\w+)\s*[(] # match the function name until the opening (
(?P<args>.*?)[)] # group the function arguments
@@ -123,7 +123,6 @@
for p in buf:
if len(p) == 0:
continue
-
m = proto_pat.match(p)
if m == None:
continue
More information about the dbus-commit
mailing list