summaryrefslogtreecommitdiffstats
path: root/Python/pystate.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2008-11-17 16:22:11 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2008-11-17 16:22:11 (GMT)
commit276c3718e3aa3954026297a9effcd952ca695aa7 (patch)
treede1b6ffb02ec9d559ee10b9a5d380f9721d9ca34 /Python/pystate.c
parent23b4bfb91f3389a085a4fffcf4bb25b899046989 (diff)
downloadcpython-276c3718e3aa3954026297a9effcd952ca695aa7.zip
cpython-276c3718e3aa3954026297a9effcd952ca695aa7.tar.gz
cpython-276c3718e3aa3954026297a9effcd952ca695aa7.tar.bz2
Issue #3327: Don't overallocate in the modules_by_index list.
Diffstat (limited to 'Python/pystate.c')
-rw-r--r--Python/pystate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/pystate.c b/Python/pystate.c
index 2a9b744..fe5de5f 100644
--- a/Python/pystate.c
+++ b/Python/pystate.c
@@ -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;
}