chiark / gitweb /
macro: introduce nice macro for disabling -Wmissing-prototypes warnigs
[elogind.git] / src / python-systemd / login.c
index 43f781922d414056693726702000dd7b70c89d1e..e844f5fc697123eec9ef8c62860a7cc223bf67a4 100644 (file)
@@ -316,12 +316,9 @@ static PyTypeObject MonitorType = {
         .tp_new = PyType_GenericNew,
 };
 
         .tp_new = PyType_GenericNew,
 };
 
-
-#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 initlogin(void) {
         PyObject *m;
 
 PyMODINIT_FUNC initlogin(void) {
         PyObject *m;
 
@@ -337,6 +334,8 @@ PyMODINIT_FUNC initlogin(void) {
         Py_INCREF(&MonitorType);
         PyModule_AddObject(m, "Monitor", (PyObject *) &MonitorType);
 }
         Py_INCREF(&MonitorType);
         PyModule_AddObject(m, "Monitor", (PyObject *) &MonitorType);
 }
+REENABLE_WARNING;
+
 #else
 
 static struct PyModuleDef module = {
 #else
 
 static struct PyModuleDef module = {
@@ -347,6 +346,7 @@ static struct PyModuleDef module = {
         methods
 };
 
         methods
 };
 
+DISABLE_WARNING_MISSING_PROTOTYPES;
 PyMODINIT_FUNC PyInit_login(void) {
         PyObject *m;
 
 PyMODINIT_FUNC PyInit_login(void) {
         PyObject *m;
 
@@ -371,7 +371,6 @@ PyMODINIT_FUNC PyInit_login(void) {
 
         return m;
 }
 
         return m;
 }
+REENABLE_WARNING;
 
 #endif
 
 #endif
-
-#pragma GCC diagnostic pop