[pypy-svn] r76881 - in pypy/branch/better-map-instances/pypy: interpreter module/__builtin__

cfbolz at codespeak.net cfbolz at codespeak.net
Mon Sep 6 10:01:11 CEST 2010


Author: cfbolz
Date: Mon Sep  6 10:01:10 2010
New Revision: 76881

Modified:
   pypy/branch/better-map-instances/pypy/interpreter/typedef.py
   pypy/branch/better-map-instances/pypy/module/__builtin__/interp_classobj.py
Log:
make old-style classes use mapdict


Modified: pypy/branch/better-map-instances/pypy/interpreter/typedef.py
==============================================================================
--- pypy/branch/better-map-instances/pypy/interpreter/typedef.py	(original)
+++ pypy/branch/better-map-instances/pypy/interpreter/typedef.py	Mon Sep  6 10:01:10 2010
@@ -198,8 +198,7 @@
                     value = func_with_new_name(value, value.func_name)
                 body[key] = value
 
-    if (features == ("user", "dict", "weakref", "slots") and
-            config.objspace.std.withmapdict):
+    if (config.objspace.std.withmapdict and "dict" in features):
         from pypy.objspace.std.mapdict import Object
         add(Object)
         features = ()

Modified: pypy/branch/better-map-instances/pypy/module/__builtin__/interp_classobj.py
==============================================================================
--- pypy/branch/better-map-instances/pypy/module/__builtin__/interp_classobj.py	(original)
+++ pypy/branch/better-map-instances/pypy/module/__builtin__/interp_classobj.py	Mon Sep  6 10:01:10 2010
@@ -397,7 +397,8 @@
         if w_meth is not None:
             space.call_function(w_meth, w_name, w_value)
         else:
-            self.setdictvalue(space, name, w_value)
+            # bit obscure: appease normalization
+            self.setdictvalue(space, name, w_value, True)
 
     def descr_delattr(self, space, w_name):
         name = unwrap_attr(space, w_name)



More information about the Pypy-commit mailing list