summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2008-07-14 16:08:26 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2008-07-14 16:08:26 +0100
commit37fd41a721a5417eeb72e90cbe3296f823ccc1b2 (patch)
tree17dadd30782955003a7631e90f4001643698b6f7
parent1896381006ec54b1dfaf8bbcaaeab14b8a12ed32 (diff)
downloaddbus-python-37fd41a721a5417eeb72e90cbe3296f823ccc1b2.tar.gz
Document that DBusPyServer_NewDBusServer consumes a reference to the server.
Rename it to DBusPyServer_NewConsumingDBusServer to make this clearer.
-rw-r--r--_dbus_bindings/server.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/_dbus_bindings/server.c b/_dbus_bindings/server.c
index 0afa34d..6af462f 100644
--- a/_dbus_bindings/server.c
+++ b/_dbus_bindings/server.c
@@ -192,12 +192,15 @@ out:
* created. For use by the Server constructor.
*
* Raises AssertionError if the DBusServer already has a Server.
+ *
+ * One reference to server is stolen - either the returned DBusPyServer
+ * claims it, or it's unreffed.
*/
static PyObject *
-DBusPyServer_NewDBusServer(PyTypeObject *cls,
- DBusServer *server,
- PyObject *mainloop,
- PyObject *auth_mechanisms)
+DBusPyServer_NewConsumingDBusServer(PyTypeObject *cls,
+ DBusServer *server,
+ PyObject *mainloop,
+ PyObject *auth_mechanisms)
{
Server *self = NULL;
PyObject *ref;
@@ -338,7 +341,8 @@ printf("%s:%d\n", __func__, __LINE__);
return NULL;
}
- self = DBusPyServer_NewDBusServer(cls, server, mainloop, auth_mechanisms);
+ self = DBusPyServer_NewConsumingDBusServer(cls, server, mainloop,
+ auth_mechanisms);
TRACE(self);
return self;