#include <Python.h>
#include <alloca.h>
+#include "util.h"
#define SD_JOURNAL_SUPPRESS_LOCATION
#include <systemd/sd-journal.h>
/* Allocate an array for the argument strings */
argc = PyTuple_Size(args);
- encoded = alloca(argc * sizeof(PyObject*));
- memset(encoded, 0, argc * sizeof(PyObject*));
+ encoded = alloca0(argc * sizeof(PyObject*));
/* Allocate sufficient iovector space for the arguments. */
iov = alloca(argc * sizeof(struct iovec));
{ 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_journal(void) {
PyObject *m;
PyModule_AddStringConstant(m, "__version__", PACKAGE_VERSION);
}
+REENABLE_WARNING;
#else
methods
};
+DISABLE_WARNING_MISSING_PROTOTYPES;
PyMODINIT_FUNC PyInit__journal(void) {
PyObject *m;
return m;
}
+REENABLE_WARNING;
#endif
-
-#pragma GCC diagnostic pop