[pypy-commit] pypy dict-strategies: translation fix for mapdict

cfbolz noreply at buildbot.pypy.org
Sun May 29 17:56:44 CEST 2011


Author: Carl Friedrich Bolz <cfbolz at gmx.de>
Branch: dict-strategies
Changeset: r44584:25d26c014079
Date: 2011-05-29 15:05 +0200
http://bitbucket.org/pypy/pypy/changeset/25d26c014079/

Log:	translation fix for mapdict

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
@@ -660,7 +660,7 @@
         return res
 
     def iter(self, w_dict):
-        return MapDictIteratorImplementation(self.space, w_dict)
+        return MapDictIteratorImplementation(self.space, self, w_dict)
 
     def clear(self, w_dict):
         w_obj = self.unerase(w_dict.dstorage)
@@ -686,9 +686,9 @@
     _become(obj, new_obj)
 
 class MapDictIteratorImplementation(IteratorImplementation):
-    def __init__(self, space, dictimplementation):
+    def __init__(self, space, strategy, dictimplementation):
         IteratorImplementation.__init__(self, space, dictimplementation)
-        w_obj = dictimplementation.strategy.unerase(dictimplementation.dstorage)
+        w_obj = strategy.unerase(dictimplementation.dstorage)
         self.w_obj = w_obj
         self.orig_map = self.curr_map = w_obj._get_mapdict_map()
 


More information about the pypy-commit mailing list