summaryrefslogtreecommitdiff
path: root/src/python-systemd/id128.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-02-21 14:23:57 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-02-28 20:04:17 -0500
commita244c095c2fc18095ec793b52a72f3a40d9973e3 (patch)
tree73b3135c55a03ae11dfd41753ebb4af3909b9a7a /src/python-systemd/id128.c
parent603c0b7b14a6b59a87ede20b2fdb6765e773c0ed (diff)
systemd-python: use PyModule_AddObject in id128
Diffstat (limited to 'src/python-systemd/id128.c')
-rw-r--r--src/python-systemd/id128.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/python-systemd/id128.c b/src/python-systemd/id128.c
index 04db786b66..42f247d108 100644
--- a/src/python-systemd/id128.c
+++ b/src/python-systemd/id128.c
@@ -106,13 +106,13 @@ static PyMethodDef methods[] = {
};
static int add_id(PyObject *module, const char* name, sd_id128_t id) {
- PyObject _cleanup_Py_DECREF_ *obj;
+ PyObject *obj;
obj = make_uuid(id);
if (!obj)
return -1;
- return PyObject_SetAttrString(module, name, obj);
+ return PyModule_AddObject(module, name, obj);
}
#pragma GCC diagnostic push