Skip to content

Commit 442f91b

Browse files
committed
convert: switch to multi-phase module initialization
Single-phase initialization is considered legacy. Signed-off-by: Benjamin Gilbert <[email protected]>
1 parent 0501e5f commit 442f91b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

openslide/_convert.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,16 +102,21 @@ static PyMethodDef _convert_methods[] = {
102102
{NULL, NULL, 0, NULL}
103103
};
104104

105+
static PyModuleDef_Slot _convert_slots[] = {
106+
{0, NULL}
107+
};
108+
105109
static struct PyModuleDef _convert_module = {
106110
PyModuleDef_HEAD_INIT,
107111
"_convert",
108112
NULL,
109113
0,
110114
_convert_methods,
115+
_convert_slots,
111116
};
112117

113118
PyMODINIT_FUNC
114119
PyInit__convert(void)
115120
{
116-
return PyModule_Create2(&_convert_module, PYTHON_API_VERSION);
121+
return PyModuleDef_Init(&_convert_module);
117122
}

0 commit comments

Comments
 (0)