File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Misc/NEWS.d/next/Core and Builtins Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change
1
+ Port _statistics module to multiphase initialization (:pep: `489 `).
Original file line number Diff line number Diff line change @@ -129,13 +129,17 @@ static PyMethodDef statistics_methods[] = {
129
129
PyDoc_STRVAR (statistics_doc ,
130
130
"Accelerators for the statistics module.\n" );
131
131
132
+ static struct PyModuleDef_Slot _statisticsmodule_slots [] = {
133
+ {0 , NULL }
134
+ };
135
+
132
136
static struct PyModuleDef statisticsmodule = {
133
137
PyModuleDef_HEAD_INIT ,
134
138
"_statistics" ,
135
139
statistics_doc ,
136
- -1 ,
140
+ 0 ,
137
141
statistics_methods ,
138
- NULL ,
142
+ _statisticsmodule_slots ,
139
143
NULL ,
140
144
NULL ,
141
145
NULL
@@ -144,5 +148,5 @@ static struct PyModuleDef statisticsmodule = {
144
148
PyMODINIT_FUNC
145
149
PyInit__statistics (void )
146
150
{
147
- return PyModule_Create (& statisticsmodule );
151
+ return PyModuleDef_Init (& statisticsmodule );
148
152
}
You can’t perform that action at this time.
0 commit comments