1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-29 21:55:36 +03:00

systemd-python: use PyModule_AddObject in id128

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2013-02-21 14:23:57 +01:00
parent 603c0b7b14
commit a244c095c2

View File

@ -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