[pypy-svn] r78211 - pypy/trunk/pypy/module/array

arigo at codespeak.net arigo at codespeak.net
Fri Oct 22 16:05:04 CEST 2010


Author: arigo
Date: Fri Oct 22 16:05:03 2010
New Revision: 78211

Modified:
   pypy/trunk/pypy/module/array/interp_array.py
Log:
Revert r78195: CPython returns longs for arrays of 'I' even on 64-bit machines,
and I don't want to consider the deep implications of that.


Modified: pypy/trunk/pypy/module/array/interp_array.py
==============================================================================
--- pypy/trunk/pypy/module/array/interp_array.py	(original)
+++ pypy/trunk/pypy/module/array/interp_array.py	Fri Oct 22 16:05:03 2010
@@ -323,7 +323,7 @@
         idx, stop, step = space.decode_index(w_idx, self.len)
         assert step == 0
         item = self.buffer[idx]
-        if mytype.canoverflow:    # if it fits in a Signed
+        if mytype.typecode in 'bBhHil':
             item = rffi.cast(lltype.Signed, item)
         elif mytype.typecode == 'f':
             item = float(item)



More information about the Pypy-commit mailing list