bpo-1635741: Port _codecs extension module to multiphase initialization (PEP 489) (GH-18065)
https://bugs.python.org/issue1635741
This commit is contained in:
parent
4eb9f4313c
commit
1ea45ae257
|
@ -0,0 +1 @@
|
||||||
|
Port _codecs extension module to multiphase initialization (:pep:`489`).
|
|
@ -1039,13 +1039,17 @@ static PyMethodDef _codecs_functions[] = {
|
||||||
{NULL, NULL} /* sentinel */
|
{NULL, NULL} /* sentinel */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static PyModuleDef_Slot _codecs_slots[] = {
|
||||||
|
{0, NULL}
|
||||||
|
};
|
||||||
|
|
||||||
static struct PyModuleDef codecsmodule = {
|
static struct PyModuleDef codecsmodule = {
|
||||||
PyModuleDef_HEAD_INIT,
|
PyModuleDef_HEAD_INIT,
|
||||||
"_codecs",
|
"_codecs",
|
||||||
NULL,
|
NULL,
|
||||||
-1,
|
0,
|
||||||
_codecs_functions,
|
_codecs_functions,
|
||||||
NULL,
|
_codecs_slots,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL
|
NULL
|
||||||
|
@ -1054,5 +1058,5 @@ static struct PyModuleDef codecsmodule = {
|
||||||
PyMODINIT_FUNC
|
PyMODINIT_FUNC
|
||||||
PyInit__codecs(void)
|
PyInit__codecs(void)
|
||||||
{
|
{
|
||||||
return PyModule_Create(&codecsmodule);
|
return PyModuleDef_Init(&codecsmodule);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue