Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Port :mod:`_bisect` to the multi-phase initialization (:pep:`489`).
18 changes: 9 additions & 9 deletions Modules/_bisectmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,21 +234,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_Slot _bisectmodule_slots[] = {
{0, NULL}
};

static struct PyModuleDef _bisectmodule = {
PyModuleDef_HEAD_INIT,
"_bisect",
module_doc,
-1,
bisect_methods,
NULL,
NULL,
NULL,
NULL
.m_name = "_bisect",
.m_doc = module_doc,
.m_methods = bisect_methods,
.m_slots = _bisectmodule_slots,
.m_size = 0
};

PyMODINIT_FUNC
PyInit__bisect(void)
{
return PyModule_Create(&_bisectmodule);
return PyModuleDef_Init(&_bisectmodule);
}