mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Implement PEP 3121: new module initialization and finalization API.
This commit is contained in:
parent
cdf94635d7
commit
1a21451b1d
113 changed files with 2230 additions and 855 deletions
|
@ -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");
|
||||
|
||||
PyMODINIT_FUNC
|
||||
init_bisect(void)
|
||||
{
|
||||
PyObject *m;
|
||||
|
||||
m = Py_InitModule3("_bisect", bisect_methods, module_doc);
|
||||
static struct PyModuleDef _bisectmodule = {
|
||||
PyModuleDef_HEAD_INIT,
|
||||
"_bisect",
|
||||
module_doc,
|
||||
-1,
|
||||
bisect_methods,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
PyMODINIT_FUNC
|
||||
PyInit__bisect(void)
|
||||
{
|
||||
return PyModule_Create(&_bisectmodule);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue