Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2afd175

Browse filesBrowse files
authored
bpo-1635741: Port _bisect module to multi-phase init (GH-22415)
1 parent d73cf7c commit 2afd175
Copy full SHA for 2afd175

File tree

2 files changed

+6
-9
lines changed
Filter options

2 files changed

+6
-9
lines changed
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Port the :mod:`_bisect` module to the multi-phase initialization API (:pep:`489`).

‎Modules/_bisectmodule.c

Copy file name to clipboardExpand all lines: Modules/_bisectmodule.c
+5-9Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -237,18 +237,14 @@ common approach.\n");
237237

238238
static struct PyModuleDef _bisectmodule = {
239239
PyModuleDef_HEAD_INIT,
240-
"_bisect",
241-
module_doc,
242-
-1,
243-
bisect_methods,
244-
NULL,
245-
NULL,
246-
NULL,
247-
NULL
240+
.m_name = "_bisect",
241+
.m_doc = module_doc,
242+
.m_methods = bisect_methods,
243+
.m_size = 0
248244
};
249245

250246
PyMODINIT_FUNC
251247
PyInit__bisect(void)
252248
{
253-
return PyModule_Create(&_bisectmodule);
249+
return PyModuleDef_Init(&_bisectmodule);
254250
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.