chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
systemd-upload: print paths in help()
[elogind.git]
/
src
/
python-systemd
/
id128.c
diff --git
a/src/python-systemd/id128.c
b/src/python-systemd/id128.c
index ec1d9fb4a2b530d6d7929bd0cf07356c40219108..5ec7309a54a94bef1857d2bf4715ff98c0dff065 100644
(file)
--- a/
src/python-systemd/id128.c
+++ b/
src/python-systemd/id128.c
@@
-21,9
+21,12
@@
#include <Python.h>
#include <Python.h>
-#include
<systemd/sd-messages.h>
+#include
"systemd/sd-messages.h"
#include "pyutil.h"
#include "pyutil.h"
+#include "log.h"
+#include "util.h"
+#include "macro.h"
PyDoc_STRVAR(module__doc__,
"Python interface to the libsystemd-id128 library.\n\n"
PyDoc_STRVAR(module__doc__,
"Python interface to the libsystemd-id128 library.\n\n"
@@
-108,11
+111,9
@@
static int add_id(PyObject *module, const char* name, sd_id128_t id) {
return PyModule_AddObject(module, name, obj);
}
return PyModule_AddObject(module, name, obj);
}
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
#if PY_MAJOR_VERSION < 3
#if PY_MAJOR_VERSION < 3
+DISABLE_WARNING_MISSING_PROTOTYPES;
PyMODINIT_FUNC initid128(void) {
PyObject *m;
PyMODINIT_FUNC initid128(void) {
PyObject *m;
@@
-126,6
+127,7
@@
PyMODINIT_FUNC initid128(void) {
#undef JOINER
PyModule_AddStringConstant(m, "__version__", PACKAGE_VERSION);
}
#undef JOINER
PyModule_AddStringConstant(m, "__version__", PACKAGE_VERSION);
}
+REENABLE_WARNING;
#else
#else
@@
-137,6
+139,7
@@
static struct PyModuleDef module = {
methods
};
methods
};
+DISABLE_WARNING_MISSING_PROTOTYPES;
PyMODINIT_FUNC PyInit_id128(void) {
PyObject *m;
PyMODINIT_FUNC PyInit_id128(void) {
PyObject *m;
@@
-155,7
+158,6
@@
PyMODINIT_FUNC PyInit_id128(void) {
return m;
}
return m;
}
+REENABLE_WARNING;
#endif
#endif
-
-#pragma GCC diagnostic pop