summaryrefslogtreecommitdiffstats
path: root/Modules/_bisectmodule.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2008-06-11 05:26:20 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2008-06-11 05:26:20 (GMT)
commit1a21451b1d73b65af949193208372e86bf308411 (patch)
tree8e98d7be9e249b011ae9380479656e5284ec0234 /Modules/_bisectmodule.c
parentcdf94635d7e364f9ce1905bafa5b540f4d16147c (diff)
downloadcpython-1a21451b1d73b65af949193208372e86bf308411.zip
cpython-1a21451b1d73b65af949193208372e86bf308411.tar.gz
cpython-1a21451b1d73b65af949193208372e86bf308411.tar.bz2
Implement PEP 3121: new module initialization and finalization API.
Diffstat (limited to 'Modules/_bisectmodule.c')
-rw-r--r--Modules/_bisectmodule.c19
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);
}