diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2008-06-11 05:26:20 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2008-06-11 05:26:20 (GMT) |
commit | 1a21451b1d73b65af949193208372e86bf308411 (patch) | |
tree | 8e98d7be9e249b011ae9380479656e5284ec0234 /Modules/_codecsmodule.c | |
parent | cdf94635d7e364f9ce1905bafa5b540f4d16147c (diff) | |
download | cpython-1a21451b1d73b65af949193208372e86bf308411.zip cpython-1a21451b1d73b65af949193208372e86bf308411.tar.gz cpython-1a21451b1d73b65af949193208372e86bf308411.tar.bz2 |
Implement PEP 3121: new module initialization and finalization API.
Diffstat (limited to 'Modules/_codecsmodule.c')
-rw-r--r-- | Modules/_codecsmodule.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/Modules/_codecsmodule.c b/Modules/_codecsmodule.c index efa4d80..96dfd56 100644 --- a/Modules/_codecsmodule.c +++ b/Modules/_codecsmodule.c @@ -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); } |