mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Issue #3327: Don't overallocate in the modules_by_index list.
This commit is contained in:
parent
23b4bfb91f
commit
276c3718e3
2 changed files with 3 additions and 1 deletions
|
@ -234,7 +234,7 @@ _PyState_AddModule(PyObject* module, struct PyModuleDef* def)
|
|||
if (!def)
|
||||
return -1;
|
||||
if (!state->modules_by_index) {
|
||||
state->modules_by_index = PyList_New(20);
|
||||
state->modules_by_index = PyList_New(0);
|
||||
if (!state->modules_by_index)
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue