[pypy-svn] r55193 - in pypy/branch/smalltalk-shadow-changes/pypy/lang/smalltalk: . test

cfbolz at codespeak.net cfbolz at codespeak.net
Sat May 24 19:13:20 CEST 2008


Author: cfbolz
Date: Sat May 24 19:13:17 2008
New Revision: 55193

Modified:
   pypy/branch/smalltalk-shadow-changes/pypy/lang/smalltalk/model.py
   pypy/branch/smalltalk-shadow-changes/pypy/lang/smalltalk/test/test_model.py
Log:
reverting r55142, it doesn't make much sense and breaks translation


Modified: pypy/branch/smalltalk-shadow-changes/pypy/lang/smalltalk/model.py
==============================================================================
--- pypy/branch/smalltalk-shadow-changes/pypy/lang/smalltalk/model.py	(original)
+++ pypy/branch/smalltalk-shadow-changes/pypy/lang/smalltalk/model.py	Sat May 24 19:13:17 2008
@@ -403,11 +403,11 @@
         
     def at0(self, index0):
         from pypy.lang.smalltalk import utility
-        return self.getword(index0)
+        return utility.wrap_int(self.getword(index0))
        
     def atput0(self, index0, w_value):
         from pypy.lang.smalltalk import utility
-        self.setword(index0, w_value)
+        self.setword(index0, utility.unwrap_int(w_value))
 
     def getword(self, n):
         return self.words[n]

Modified: pypy/branch/smalltalk-shadow-changes/pypy/lang/smalltalk/test/test_model.py
==============================================================================
--- pypy/branch/smalltalk-shadow-changes/pypy/lang/smalltalk/test/test_model.py	(original)
+++ pypy/branch/smalltalk-shadow-changes/pypy/lang/smalltalk/test/test_model.py	Sat May 24 19:13:17 2008
@@ -196,12 +196,3 @@
     assert res
     assert w_clsa.as_class_get_shadow() is s_clsb
     assert w_clsb.as_class_get_shadow() is s_clsa
-
-def test_wordsobject_at0_atput0():
-    w_words = model.W_WordsObject(None, 3)
-    w_words.atput0(0, 'a')
-    w_words.atput0(1, 'b')
-    w_words.atput0(2, 'c')
-    assert w_words.at0(0) == 'a'
-    assert w_words.at0(1) == 'b'
-    assert w_words.at0(2) == 'c'



More information about the Pypy-commit mailing list