mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
Implement PEP 3121: new module initialization and finalization API.
This commit is contained in:
parent
cdf94635d7
commit
1a21451b1d
113 changed files with 2230 additions and 855 deletions
|
@ -1152,8 +1152,20 @@ static PyMethodDef _codecs_functions[] = {
|
|||
{NULL, NULL} /* sentinel */
|
||||
};
|
||||
|
||||
static struct PyModuleDef codecsmodule = {
|
||||
PyModuleDef_HEAD_INIT,
|
||||
"_codecs",
|
||||
NULL,
|
||||
-1,
|
||||
_codecs_functions,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
PyMODINIT_FUNC
|
||||
init_codecs(void)
|
||||
PyInit__codecs(void)
|
||||
{
|
||||
Py_InitModule("_codecs", _codecs_functions);
|
||||
return PyModule_Create(&codecsmodule);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue