[pypy-svn] r73080 - pypy/branch/reduce-instance-size-experiments/pypy/objspace/std

cfbolz at codespeak.net cfbolz at codespeak.net
Mon Mar 29 17:02:32 CEST 2010


Author: cfbolz
Date: Mon Mar 29 17:02:30 2010
New Revision: 73080

Modified:
   pypy/branch/reduce-instance-size-experiments/pypy/objspace/std/sharingdict.py
Log:
fix translation


Modified: pypy/branch/reduce-instance-size-experiments/pypy/objspace/std/sharingdict.py
==============================================================================
--- pypy/branch/reduce-instance-size-experiments/pypy/objspace/std/sharingdict.py	(original)
+++ pypy/branch/reduce-instance-size-experiments/pypy/objspace/std/sharingdict.py	Mon Mar 29 17:02:30 2010
@@ -54,6 +54,8 @@
     if not space.config.objspace.std.withsharingtaggingdict:
         return w_value
     from pypy.rlib.rerased import erase
+    if w_value is None:
+        return erase(w_value)
     if space.is_true(space.isinstance(w_value, space.w_int)):
         try:
             return erase(space.int_w(w_value))
@@ -115,7 +117,7 @@
             return
         new_structure = self.structure.get_next_structure(key)
         if new_structure.length > len(self.entries):
-            new_entries = [None] * new_structure.size_estimate()
+            new_entries = [erase(self.space, None)] * new_structure.size_estimate()
             for i in range(len(self.entries)):
                 new_entries[i] = self.entries[i]
             self.entries = new_entries



More information about the Pypy-commit mailing list