summaryrefslogtreecommitdiff
path: root/Python/pystate.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2008-11-17 16:22:11 +0000
committerMartin v. Löwis <martin@v.loewis.de>2008-11-17 16:22:11 +0000
commitf6b6511ee4d4064c98838c7a5987d605bf991750 (patch)
tree2437c82d8acc380a0def63b93e187267598e075b /Python/pystate.c
parent24d3692abd6bee1005b8ad439f7e2f084c1de17f (diff)
downloadcpython-f6b6511ee4d4064c98838c7a5987d605bf991750.tar.gz
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 2a9b7443f9..fe5de5f4d2 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;
}