summaryrefslogtreecommitdiff
path: root/src/python-systemd/login.c
diff options
context:
space:
mode:
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