Author: Lars Wassermann <[email protected]>
Branch:
Changeset: r244:eb49c3494141
Date: 2013-04-03 13:32 +0200
http://bitbucket.org/pypy/lang-smalltalk/changeset/eb49c3494141/
Log: fixed at0 of LargePositive1Word Integer: results can not be negative
!!!!!!!!!!!!!!!!!!!!
diff --git a/spyvm/model.py b/spyvm/model.py
--- a/spyvm/model.py
+++ b/spyvm/model.py
@@ -215,9 +215,9 @@
def at0(self, space, index0):
if index0 >= self.size():
raise IndexError()
- skew = index0 * 8
- mask = 0xff << skew
- return space.wrap_int(intmask((self.value & mask) >> skew))
+ shift = index0 * 8
+ result = (self.value >> shift) & 0xff
+ return space.wrap_int(intmask(result))
def atput0(self, space, index0, w_byte):
if index0 >= self.size():
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit