diff options
Diffstat (limited to 'Modules/_bisectmodule.c')
-rw-r--r-- | Modules/_bisectmodule.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/Modules/_bisectmodule.c b/Modules/_bisectmodule.c index b283b0d3..1280b04 100644 --- a/Modules/_bisectmodule.c +++ b/Modules/_bisectmodule.c @@ -226,10 +226,21 @@ having to sort the list after each insertion. For long lists of items with\n\ expensive comparison operations, this can be an improvement over the more\n\ common approach.\n"); + +static struct PyModuleDef _bisectmodule = { + PyModuleDef_HEAD_INIT, + "_bisect", + module_doc, + -1, + bisect_methods, + NULL, + NULL, + NULL, + NULL +}; + PyMODINIT_FUNC -init_bisect(void) +PyInit__bisect(void) { - PyObject *m; - - m = Py_InitModule3("_bisect", bisect_methods, module_doc); + return PyModule_Create(&_bisectmodule); } |