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:
parent
603c0b7b14
commit
a244c095c2
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user