diff options
Diffstat (limited to 'Modules/_json.c')
-rw-r--r-- | Modules/_json.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/Modules/_json.c b/Modules/_json.c index cc52ff6..a4308fd 100644 --- a/Modules/_json.c +++ b/Modules/_json.c @@ -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); } |