mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +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
|
|
@ -613,9 +613,20 @@ static PyMethodDef json_methods[] = {
|
|||
PyDoc_STRVAR(module_doc,
|
||||
"json speedups\n");
|
||||
|
||||
void
|
||||
init_json(void)
|
||||
static struct PyModuleDef jsonmodule = {
|
||||
PyModuleDef_HEAD_INIT,
|
||||
"_json",
|
||||
module_doc,
|
||||
-1,
|
||||
json_methods,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
PyObject*
|
||||
PyInit__json(void)
|
||||
{
|
||||
PyObject *m;
|
||||
m = Py_InitModule3("_json", json_methods, module_doc);
|
||||
return PyModule_Create(&jsonmodule);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue