X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fpython-systemd%2Fid128.c;h=ec1d9fb4a2b530d6d7929bd0cf07356c40219108;hp=a6711a5bd5f6b6a24f00a0eaf80a979a312d601e;hb=925d98b3441881bad3a459cb5f7f3785bab40b5c;hpb=6a6633a16a510b40c6ad30cd0858699619384a44 diff --git a/src/python-systemd/id128.c b/src/python-systemd/id128.c index a6711a5bd..ec1d9fb4a 100644 --- a/src/python-systemd/id128.c +++ b/src/python-systemd/id128.c @@ -19,8 +19,6 @@ along with systemd; If not, see . ***/ -#include - #include #include @@ -52,9 +50,9 @@ PyDoc_STRVAR(get_boot__doc__, ); static PyObject* make_uuid(sd_id128_t id) { - PyObject _cleanup_Py_DECREF_ + _cleanup_Py_DECREF_ PyObject *uuid = NULL, *UUID = NULL, *bytes = NULL, - *args = NULL, *kwargs = NULL, *obj = NULL; + *args = NULL, *kwargs = NULL; uuid = PyImport_ImportModule("uuid"); if (!uuid) @@ -126,6 +124,7 @@ PyMODINIT_FUNC initid128(void) { #define JOINER ; #include "id128-constants.h" #undef JOINER + PyModule_AddStringConstant(m, "__version__", PACKAGE_VERSION); } #else @@ -134,7 +133,7 @@ static struct PyModuleDef module = { PyModuleDef_HEAD_INIT, "id128", /* name of module */ module__doc__, /* module documentation, may be NULL */ - 0, /* size of per-interpreter state of the module */ + -1, /* size of per-interpreter state of the module */ methods }; @@ -149,7 +148,7 @@ PyMODINIT_FUNC PyInit_id128(void) { #define JOINER || #include "id128-constants.h" #undef JOINER - false) { + PyModule_AddStringConstant(m, "__version__", PACKAGE_VERSION)) { Py_DECREF(m); return NULL; }