summaryrefslogtreecommitdiff
path: root/src/python-systemd
diff options
context:
space:
mode:
Diffstat (limited to 'src/python-systemd')
-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