diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/_native.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/_native.c b/src/_native.c index e4c31c3..b7fd9e8 100644 --- a/src/_native.c +++ b/src/_native.c @@ -310,9 +310,15 @@ static PyMethodDef net_monitor_Methods[] = { {NULL, NULL, 0, NULL} /* Sentinel */ }; -PyMODINIT_FUNC -init_native(void) +static PyModuleDef net_monitor_Module = { + PyModuleDef_HEAD_INIT, + "_native", /* name of module */ + "", /* module documentation, may be NULL */ + -1, /* size of per-interpreter state of the module, or -1 if the module keeps state in global variables. */ + net_monitor_Methods +}; + +PyMODINIT_FUNC PyInit__native(void) { - (void) Py_InitModule("_native", net_monitor_Methods); + return PyModule_Create(&net_monitor_Module); } - |