10000 bpo-40077: Convert arraymodule to use heap types and establish module state by erlend-aasland · Pull Request #23124 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-40077: Convert arraymodule to use heap types and establish module state #23124

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Jan 2, 2021
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
0