summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2011-12-13 17:15:41 -0500
committerBarry Warsaw <barry@python.org>2011-12-13 17:15:41 -0500
commit4477b6120240e186db8d86619f6da63faca296ba (patch)
tree574dcc65dfc68937a2c52741cbccedd4d1f6636e
parent48abd4782f336de2d6dd228e58f86729778e26fb (diff)
downloaddbus-python-4477b6120240e186db8d86619f6da63faca296ba.tar.gz
For pendantic correctness, and future Python 3 compatibility, explicitly
initialize the weaklist slots.
-rw-r--r--_dbus_bindings/conn.c1
-rw-r--r--_dbus_bindings/server.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/_dbus_bindings/conn.c b/_dbus_bindings/conn.c
index 40f6cf5..2e40bac 100644
--- a/_dbus_bindings/conn.c
+++ b/_dbus_bindings/conn.c
@@ -232,6 +232,7 @@ DBusPyConnection_NewConsumingDBusConnection(PyTypeObject *cls,
self->has_mainloop = (mainloop != Py_None);
self->conn = NULL;
self->filters = PyList_New(0);
+ self->weaklist = NULL;
if (!self->filters) goto err;
self->object_paths = PyDict_New();
if (!self->object_paths) goto err;
diff --git a/_dbus_bindings/server.c b/_dbus_bindings/server.c
index 20c3d49..9d7385f 100644
--- a/_dbus_bindings/server.c
+++ b/_dbus_bindings/server.c
@@ -388,6 +388,7 @@ Server_tp_new(PyTypeObject *cls, PyObject *args, PyObject *kwargs)
self = DBusPyServer_NewConsumingDBusServer(cls, server, conn_class,
mainloop, auth_mechanisms);
+ ((Server *)self)->weaklist = NULL;
TRACE(self);
return self;