[pypy-svn] r69106 - pypy/branch/io-lang/pypy/lang/io

david at codespeak.net david at codespeak.net
Mon Nov 9 21:32:51 CET 2009


Author: david
Date: Mon Nov  9 21:32:51 2009
New Revision: 69106

Modified:
   pypy/branch/io-lang/pypy/lang/io/object.py
Log:
Fix Object setSlot to use correct target and context in generated methods

Modified: pypy/branch/io-lang/pypy/lang/io/object.py
==============================================================================
--- pypy/branch/io-lang/pypy/lang/io/object.py	(original)
+++ pypy/branch/io-lang/pypy/lang/io/object.py	Mon Nov  9 21:32:51 2009
@@ -181,9 +181,13 @@
 def object_new_slot(space, w_target, name, w_value):
     from pypy.lang.io.model import W_CFunction
     w_target.slots[name] = w_value
-    def setSlot(space, w_target, w_message, w_context):
-        w_target.slots[name] = w_message.arguments[0].eval(space, w_context, w_context)
-        return w_target
+
+    def setSlot(my_space, w_w_target, w_w_message, w_w_context):
+        w_w_target.slots[name] = w_w_message.arguments[0].eval(my_space, 
+                                                                w_w_context,
+                                                                w_w_target)
+        return w_w_target
+
     w_target.slots['set%s' % (name[0].capitalize() + name[1:])] = W_CFunction(space, setSlot)
     
 @register_method('Object', 'updateSlot', unwrap_spec=[object, str, object])



More information about the Pypy-commit mailing list