Skip to content
Prev Previous commit
Next Next commit
Use PyModule_AddType()
  • Loading branch information
Erlend E. Aasland committed Nov 3, 2020
commit c3dfade9c4558bcadcbc48e97dd0a7c7ab6f2d7a
4 changes: 1 addition & 3 deletions Modules/arraymodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -3005,9 +3005,7 @@ array_modexec(PyObject *m)
}
Py_DECREF(res);

Py_INCREF((PyObject *)state->ArrayType);
if (PyModule_AddObject(m, "array", (PyObject *)state->ArrayType) < 0) {
Py_DECREF((PyObject *)state->ArrayType);
if (PyModule_AddType(m, state->ArrayType) < 0) {
return -1;
}

Expand Down