[pypy-commit] pypy py3.5: 32bit translation issue, prebuilt long

plan_rich pypy.commits at gmail.com
Thu Aug 18 05:36:39 EDT 2016


Author: Richard Plangger <planrichi at gmail.com>
Branch: py3.5
Changeset: r86265:5b83e4237db3
Date: 2016-08-16 12:01 +0200
http://bitbucket.org/pypy/pypy/changeset/5b83e4237db3/

Log:	32bit translation issue, prebuilt long

diff --git a/pypy/objspace/std/bytearrayobject.py b/pypy/objspace/std/bytearrayobject.py
--- a/pypy/objspace/std/bytearrayobject.py
+++ b/pypy/objspace/std/bytearrayobject.py
@@ -3,6 +3,7 @@
 from rpython.rlib.objectmodel import (
     import_from_mixin, newlist_hint, resizelist_hint, specialize)
 from rpython.rlib.buffer import Buffer
+from rpython.rlib.rarithmetic import intmask
 from rpython.rlib.rstring import StringBuilder, ByteListBuilder
 from rpython.rlib.debug import check_list_of_chars
 from rpython.rtyper.lltypesystem import rffi
@@ -495,7 +496,7 @@
     return data
 
 HEXDIGITS = "0123456789abcdef"
-PY_SIZE_T_MAX = 2**(rffi.sizeof(rffi.SIZE_T)*8)-1
+PY_SIZE_T_MAX = intmask(2**(rffi.sizeof(rffi.SIZE_T)*8)-1)
 
 @specialize.arg(3) # raw access
 def _array_to_hexstring(space, buf, len=0, rawaccess=False):


More information about the pypy-commit mailing list