summaryrefslogtreecommitdiffstats
path: root/Modules/fcntlmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/fcntlmodule.c')
-rw-r--r--Modules/fcntlmodule.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/Modules/fcntlmodule.c b/Modules/fcntlmodule.c
index 9acfece..353889c 100644
--- a/Modules/fcntlmodule.c
+++ b/Modules/fcntlmodule.c
@@ -599,17 +599,31 @@ all_ins(PyObject* d)
return 0;
}
+
+static struct PyModuleDef fcntlmodule = {
+ PyModuleDef_HEAD_INIT,
+ "fcntl",
+ module_doc,
+ -1,
+ fcntl_methods,
+ NULL,
+ NULL,
+ NULL,
+ NULL
+};
+
PyMODINIT_FUNC
-initfcntl(void)
+PyInit_fcntl(void)
{
PyObject *m, *d;
/* Create the module and add the functions and documentation */
- m = Py_InitModule3("fcntl", fcntl_methods, module_doc);
+ m = PyModule_Create(&fcntlmodule);
if (m == NULL)
- return;
+ return NULL;
/* Add some symbolic constants to the module */
d = PyModule_GetDict(m);
all_ins(d);
+ return m;
}