summaryrefslogtreecommitdiff
path: root/src/python-systemd/id128.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-02-20 18:35:03 +0100
committerLennart Poettering <lennart@poettering.net>2014-02-20 18:47:33 +0100
commitf0f2e63bb2d5cd27e6a2464ee46a670a3159c5da (patch)
tree6bb637393bc095a041ec89cc488a21889e652a45 /src/python-systemd/id128.c
parentbcfce235a3d757f0ec3b0c01e8583382db1adfe2 (diff)
macro: introduce nice macro for disabling -Wmissing-prototypes warnigs
Diffstat (limited to 'src/python-systemd/id128.c')
-rw-r--r--src/python-systemd/id128.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/python-systemd/id128.c b/src/python-systemd/id128.c
index ec1d9fb4a2..6dadf7b2fd 100644
--- a/src/python-systemd/id128.c
+++ b/src/python-systemd/id128.c
@@ -24,6 +24,9 @@
#include <systemd/sd-messages.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"
@@ -108,11 +111,9 @@ static int add_id(PyObject *module, const char* name, sd_id128_t id) {
return PyModule_AddObject(module, name, obj);
}
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
#if PY_MAJOR_VERSION < 3
+DISABLE_WARNING_MISSING_PROTOTYPES;
PyMODINIT_FUNC initid128(void) {
PyObject *m;
@@ -126,6 +127,7 @@ PyMODINIT_FUNC initid128(void) {
#undef JOINER
PyModule_AddStringConstant(m, "__version__", PACKAGE_VERSION);
}
+REENABLE_WARNING;
#else
@@ -137,6 +139,7 @@ static struct PyModuleDef module = {
methods
};
+DISABLE_WARNING_MISSING_PROTOTYPES;
PyMODINIT_FUNC PyInit_id128(void) {
PyObject *m;
@@ -155,7 +158,6 @@ PyMODINIT_FUNC PyInit_id128(void) {
return m;
}
+REENABLE_WARNING;
#endif
-
-#pragma GCC diagnostic pop