diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-01-19-11-06-30.bpo-1635741.0mjsfm.rst b/Misc/NEWS.d/next/Core and Builtins/2020-01-19-11-06-30.bpo-1635741.0mjsfm.rst new file mode 100644 index 00000000000000..10fc23bcfa1173 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2020-01-19-11-06-30.bpo-1635741.0mjsfm.rst @@ -0,0 +1 @@ +Port _codecs extension module to multiphase initialization (:pep:`489`). \ No newline at end of file diff --git a/Modules/_codecsmodule.c b/Modules/_codecsmodule.c index a8ffb699557abf..952072102d5d8d 100644 --- a/Modules/_codecsmodule.c +++ b/Modules/_codecsmodule.c @@ -1039,13 +1039,17 @@ static PyMethodDef _codecs_functions[] = { {NULL, NULL} /* sentinel */ }; +static PyModuleDef_Slot _codecs_slots[] = { + {0, NULL} +}; + static struct PyModuleDef codecsmodule = { PyModuleDef_HEAD_INIT, "_codecs", NULL, - -1, + 0, _codecs_functions, - NULL, + _codecs_slots, NULL, NULL, NULL @@ -1054,5 +1058,5 @@ static struct PyModuleDef codecsmodule = { PyMODINIT_FUNC PyInit__codecs(void) { - return PyModule_Create(&codecsmodule); + return PyModuleDef_Init(&codecsmodule); } pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy