chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rtnl: drop "sd_" prefix from cleanup macros
[elogind.git]
/
src
/
python-systemd
/
id128.c
diff --git
a/src/python-systemd/id128.c
b/src/python-systemd/id128.c
index 865cc3ce22926e113d5428986272b1f5d511ddde..ec1d9fb4a2b530d6d7929bd0cf07356c40219108 100644
(file)
--- a/
src/python-systemd/id128.c
+++ b/
src/python-systemd/id128.c
@@
-19,8
+19,6
@@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <stdbool.h>
-
#include <Python.h>
#include <systemd/sd-messages.h>
#include <Python.h>
#include <systemd/sd-messages.h>
@@
-52,9
+50,9
@@
PyDoc_STRVAR(get_boot__doc__,
);
static PyObject* make_uuid(sd_id128_t id) {
);
static PyObject* make_uuid(sd_id128_t id) {
- PyObject _cleanup_Py_DECREF_
+ _cleanup_Py_DECREF_ PyObject
*uuid = NULL, *UUID = NULL, *bytes = NULL,
*uuid = NULL, *UUID = NULL, *bytes = NULL,
- *args = NULL, *kwargs = NULL
, *obj = NULL
;
+ *args = NULL, *kwargs = NULL;
uuid = PyImport_ImportModule("uuid");
if (!uuid)
uuid = PyImport_ImportModule("uuid");
if (!uuid)
@@
-126,6
+124,7
@@
PyMODINIT_FUNC initid128(void) {
#define JOINER ;
#include "id128-constants.h"
#undef JOINER
#define JOINER ;
#include "id128-constants.h"
#undef JOINER
+ PyModule_AddStringConstant(m, "__version__", PACKAGE_VERSION);
}
#else
}
#else
@@
-149,7
+148,7
@@
PyMODINIT_FUNC PyInit_id128(void) {
#define JOINER ||
#include "id128-constants.h"
#undef JOINER
#define JOINER ||
#include "id128-constants.h"
#undef JOINER
-
false
) {
+
PyModule_AddStringConstant(m, "__version__", PACKAGE_VERSION)
) {
Py_DECREF(m);
return NULL;
}
Py_DECREF(m);
return NULL;
}