Commit 276c3718 authored by Martin v. Löwis's avatar Martin v. Löwis

Issue #3327: Don't overallocate in the modules_by_index list.

parent 23b4bfb9
......@@ -13,6 +13,8 @@ What's New in Python 3.0 release candiate 3?
Core and Builtins
-----------------
- Issue #3327: Don't overallocate in the modules_by_index list.
- Issue #1721812: Binary set operations and copy() returned the input type
instead of the appropriate base type. This was incorrect because set
subclasses would be created without their __init__() method being called.
......
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment