summaryrefslogtreecommitdiff
path: root/src/python-systemd/_daemon.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/_daemon.c
parentbcfce235a3d757f0ec3b0c01e8583382db1adfe2 (diff)
macro: introduce nice macro for disabling -Wmissing-prototypes warnigs
Diffstat (limited to 'src/python-systemd/_daemon.c')
-rw-r--r--src/python-systemd/_daemon.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/python-systemd/_daemon.c b/src/python-systemd/_daemon.c
index 3982e85426..7756a7880d 100644
--- a/src/python-systemd/_daemon.c
+++ b/src/python-systemd/_daemon.c
@@ -31,6 +31,7 @@
#include <systemd/sd-daemon.h>
#include "pyutil.h"
+#include "macro.h"
PyDoc_STRVAR(module__doc__,
"Python interface to the libsystemd-daemon library.\n\n"
@@ -284,11 +285,9 @@ static PyMethodDef methods[] = {
{ NULL, NULL, 0, NULL } /* Sentinel */
};
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
#if PY_MAJOR_VERSION < 3
+DISABLE_WARNING_MISSING_PROTOTYPES;
PyMODINIT_FUNC init_daemon(void) {
PyObject *m;
@@ -299,6 +298,7 @@ PyMODINIT_FUNC init_daemon(void) {
PyModule_AddIntConstant(m, "LISTEN_FDS_START", SD_LISTEN_FDS_START);
PyModule_AddStringConstant(m, "__version__", PACKAGE_VERSION);
}
+REENABLE_WARNING;
#else
@@ -310,6 +310,7 @@ static struct PyModuleDef module = {
methods
};
+DISABLE_WARNING_MISSING_PROTOTYPES;
PyMODINIT_FUNC PyInit__daemon(void) {
PyObject *m;
@@ -325,7 +326,6 @@ PyMODINIT_FUNC PyInit__daemon(void) {
return m;
}
+REENABLE_WARNING;
#endif
-
-#pragma GCC diagnostic pop