Skip to content

Commit

Permalink
bpo-1635741: Port _statistics module to multiphase initialization (GH…
Browse files Browse the repository at this point in the history
  • Loading branch information
corona10 committed Mar 16, 2020
1 parent 87ec86c commit 356c878
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Port _statistics module to multiphase initialization (:pep:`489`).
10 changes: 7 additions & 3 deletions Modules/_statisticsmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,17 @@ static PyMethodDef statistics_methods[] = {
PyDoc_STRVAR(statistics_doc,
"Accelerators for the statistics module.\n");

static struct PyModuleDef_Slot _statisticsmodule_slots[] = {
{0, NULL}
};

static struct PyModuleDef statisticsmodule = {
PyModuleDef_HEAD_INIT,
"_statistics",
statistics_doc,
-1,
0,
statistics_methods,
NULL,
_statisticsmodule_slots,
NULL,
NULL,
NULL
Expand All @@ -144,5 +148,5 @@ static struct PyModuleDef statisticsmodule = {
PyMODINIT_FUNC
PyInit__statistics(void)
{
return PyModule_Create(&statisticsmodule);
return PyModuleDef_Init(&statisticsmodule);
}

0 comments on commit 356c878

Please sign in to comment.