[Python-3000-checkins] r67242 - in python/branches/py3k: Misc/NEWS Python/pystate.c

martin.v.loewis python-3000-checkins at python.org
Mon Nov 17 17:22:12 CET 2008


Author: martin.v.loewis
Date: Mon Nov 17 17:22:11 2008
New Revision: 67242

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


Modified:
   python/branches/py3k/Misc/NEWS
   python/branches/py3k/Python/pystate.c

Modified: python/branches/py3k/Misc/NEWS
==============================================================================
--- python/branches/py3k/Misc/NEWS	(original)
+++ python/branches/py3k/Misc/NEWS	Mon Nov 17 17:22:11 2008
@@ -13,6 +13,8 @@
 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.

Modified: python/branches/py3k/Python/pystate.c
==============================================================================
--- python/branches/py3k/Python/pystate.c	(original)
+++ python/branches/py3k/Python/pystate.c	Mon Nov 17 17:22:11 2008
@@ -234,7 +234,7 @@
 	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;
 	}


More information about the Python-3000-checkins mailing list