diff options
author | Papoteur <papoteur@mageialinux-online.org> | 2015-09-13 15:17:28 +0200 |
---|---|---|
committer | Papoteur <papoteur@mageialinux-online.org> | 2015-09-13 15:17:28 +0200 |
commit | 1df93215d22705cd15bf5bac930f703b32469929 (patch) | |
tree | 214662c9d2b3092796a03edbe4c71d2046077b5a /src | |
parent | dfce065c6be3f61811c1b8461e8954996592f4f4 (diff) | |
download | net_monitor-1df93215d22705cd15bf5bac930f703b32469929.tar net_monitor-1df93215d22705cd15bf5bac930f703b32469929.tar.gz net_monitor-1df93215d22705cd15bf5bac930f703b32469929.tar.bz2 net_monitor-1df93215d22705cd15bf5bac930f703b32469929.tar.xz net_monitor-1df93215d22705cd15bf5bac930f703b32469929.zip |
Adaptation of _native module for Python 3
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); } - |