Skip to content

Commit

Permalink
PEP 489 Multi Phase Init support
Browse files Browse the repository at this point in the history
  • Loading branch information
WillAyd committed Jul 29, 2020
1 parent 7c987cc commit 3a05c87
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions python/ujson.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ static struct PyModuleDef moduledef = {
PyModuleDef_HEAD_INIT,
"ujson",
0, /* m_doc */
-1, /* m_size */
NULL, /* m_size */
ujsonMethods, /* m_methods */
NULL, /* m_reload */
NULL, /* m_traverse */
Expand All @@ -83,19 +83,6 @@ static struct PyModuleDef moduledef = {

PyObject *PyInit_ujson(void)
{
PyObject *module;
PyObject *version_string;

initObjToJSON();
module = PyModule_Create(&moduledef);

if (module == NULL)
{
return NULL;
}

version_string = PyUnicode_FromString (UJSON_VERSION);
PyModule_AddObject (module, "__version__", version_string);

return module;
return PyModuleDef_Init(&moduledef);
}

0 comments on commit 3a05c87

Please sign in to comment.