summaryrefslogtreecommitdiffstats
path: root/Modules/_statisticsmodule.c
diff options
context:
space:
mode:
authorDong-hee Na <donghee.na92@gmail.com>2020-03-16 15:10:21 (GMT)
committerGitHub <noreply@github.com>2020-03-16 15:10:21 (GMT)
commit356c878fbf2a97aa3ab7951fd7456d219ff0b466 (patch)
treebb2f989cbdfcc8719a94dc06634a39c5b4982985 /Modules/_statisticsmodule.c
parent87ec86c425a5cd3ad41b831b54c0ce1a0c363f4b (diff)
downloadcpython-356c878fbf2a97aa3ab7951fd7456d219ff0b466.zip
cpython-356c878fbf2a97aa3ab7951fd7456d219ff0b466.tar.gz
cpython-356c878fbf2a97aa3ab7951fd7456d219ff0b466.tar.bz2
bpo-1635741: Port _statistics module to multiphase initialization (GH-19015)
Diffstat (limited to 'Modules/_statisticsmodule.c')
-rw-r--r--Modules/_statisticsmodule.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/Modules/_statisticsmodule.c b/Modules/_statisticsmodule.c
index fcdc9ce..e98359a 100644
--- a/Modules/_statisticsmodule.c
+++ b/Modules/_statisticsmodule.c
@@ -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
@@ -144,5 +148,5 @@ static struct PyModuleDef statisticsmodule = {
PyMODINIT_FUNC
PyInit__statistics(void)
{
- return PyModule_Create(&statisticsmodule);
+ return PyModuleDef_Init(&statisticsmodule);
}