[pypy-svn] r77117 - pypy/branch/better-map-instances/pypy/objspace/std

cfbolz at codespeak.net cfbolz at codespeak.net
Thu Sep 16 15:53:02 CEST 2010


Author: cfbolz
Date: Thu Sep 16 15:53:00 2010
New Revision: 77117

Modified:
   pypy/branch/better-map-instances/pypy/objspace/std/mapdict.py
Log:
grrr, reshuffling again

Modified: pypy/branch/better-map-instances/pypy/objspace/std/mapdict.py
==============================================================================
--- pypy/branch/better-map-instances/pypy/objspace/std/mapdict.py	(original)
+++ pypy/branch/better-map-instances/pypy/objspace/std/mapdict.py	Thu Sep 16 15:53:00 2010
@@ -377,8 +377,6 @@
     pass # mainly for tests
 
 def get_subclass_of_correct_size(space, cls, supercls, w_type):
-    if not hasattr(supercls, "_init_empty"):
-        return supercls # not a mapdict class
     assert space.config.objspace.std.withmapdict
     map = w_type.terminator
     classes = memo_get_subclass_of_correct_size(space, supercls)
@@ -398,6 +396,8 @@
     try:
         return _subclass_cache[key]
     except KeyError:
+	if not hasattr(supercls, "_init_empty"):
+            result = [supercls] * NUM_SUBCLASSES # not a mapdict
         if (not issubclass(supercls, W_ObjectObject) or
                 hasattr(supercls, '__del__')):
             class subcls(ObjectMixin, supercls):



More information about the Pypy-commit mailing list