Author: Lukas Diekmann <lukas.diekm...@uni-duesseldorf.de>
Branch: type-specialized-instances
Changeset: r49525:ca3e806187f6
Date: 2011-11-18 14:41 +0100
http://bitbucket.org/pypy/pypy/changeset/ca3e806187f6/

Log:    fixed read with new selector (still not sure if this is the right
        fix)

diff --git a/pypy/objspace/std/mapdict.py b/pypy/objspace/std/mapdict.py
--- a/pypy/objspace/std/mapdict.py
+++ b/pypy/objspace/std/mapdict.py
@@ -100,7 +100,8 @@
 
     def _findmap(self, selector):
         while isinstance(self, AbstractStoredAttribute):
-            if selector == self.selector:
+            # XXX is this the right fix?
+            if selector == self.selector[:2]:
                 return self
             self = self.back
         return None
@@ -277,11 +278,12 @@
         self._size_estimate = self.length() * NUM_DIGITS_POW2
 
     def _copy_attr(self, obj, new_obj):
-        w_value = self.read(obj, self.selector)
+        #XXX this the right fix?
+        w_value = self.read(obj, self.selector[:2])
         new_obj._get_mapdict_map().add_attr(new_obj, self.selector, w_value)
 
     def delete(self, obj, selector):
-        if selector == self.selector:
+        if selector == self.selector[:2]:
             # ok, attribute is deleted
             return self.back.copy(obj)
         new_obj = self.back.delete(obj, selector)
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to