Skip to content
Closed
Changes from 1 commit
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
Next Next commit
Port _bisect extension module to multiphase initialization(PEP 489)
  • Loading branch information
shihai1991 committed Jan 18, 2020
commit 04c3060fa90bca83b4c4bb19c0c6b91de6690f92
9 changes: 6 additions & 3 deletions Modules/_bisectmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,14 +260,17 @@ 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 PyModuleDef_Slot _bisect_slots[] = {
{0, NULL}
};

static struct PyModuleDef _bisectmodule = {
PyModuleDef_HEAD_INIT,
"_bisect",
module_doc,
-1,
0,
bisect_methods,
NULL,
_bisect_slots,
NULL,
NULL,
NULL
Expand All @@ -276,5 +279,5 @@ static struct PyModuleDef _bisectmodule = {
PyMODINIT_FUNC
PyInit__bisect(void)
{
return PyModule_Create(&_bisectmodule);
return PyModuleDef_Init(&_bisectmodule);
}