summaryrefslogtreecommitdiff
path: root/src/python-systemd/login.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/login.c
parentbcfce235a3d757f0ec3b0c01e8583382db1adfe2 (diff)
macro: introduce nice macro for disabling -Wmissing-prototypes warnigs
Diffstat (limited to 'src/python-systemd/login.c')
-rw-r--r--src/python-systemd/login.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/python-systemd/login.c b/src/python-systemd/login.c
index 43f781922d..e844f5fc69 100644
--- a/src/python-systemd/login.c
+++ b/src/python-systemd/login.c
@@ -316,12 +316,9 @@ static PyTypeObject MonitorType = {
.tp_new = PyType_GenericNew,
};
-
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
#if PY_MAJOR_VERSION < 3
+DISABLE_WARNING_MISSING_PROTOTYPES;
PyMODINIT_FUNC initlogin(void) {
PyObject *m;
@@ -337,6 +334,8 @@ PyMODINIT_FUNC initlogin(void) {
Py_INCREF(&MonitorType);
PyModule_AddObject(m, "Monitor", (PyObject *) &MonitorType);
}
+REENABLE_WARNING;
+
#else
static struct PyModuleDef module = {
@@ -347,6 +346,7 @@ static struct PyModuleDef module = {
methods
};
+DISABLE_WARNING_MISSING_PROTOTYPES;
PyMODINIT_FUNC PyInit_login(void) {
PyObject *m;
@@ -371,7 +371,6 @@ PyMODINIT_FUNC PyInit_login(void) {
return m;
}
+REENABLE_WARNING;
#endif
-
-#pragma GCC diagnostic pop