Author: Amaury Forgeot d'Arc <[email protected]>
Branch: py3.5
Changeset: r88033:c715b57ada9b
Date: 2016-11-01 16:28 +0100
http://bitbucket.org/pypy/pypy/changeset/c715b57ada9b/
Log: Try to fix translation on linux32
diff --git a/pypy/module/bz2/interp_bz2.py b/pypy/module/bz2/interp_bz2.py
--- a/pypy/module/bz2/interp_bz2.py
+++ b/pypy/module/bz2/interp_bz2.py
@@ -102,6 +102,8 @@
INITIAL_BUFFER_SIZE = 8192
UINT_MAX = 2**32-1
+MAX_BUFSIZE = min(sys.maxint, UINT_MAX)
+assert isinstance(MAX_BUFSIZE, int)
if rffi.sizeof(rffi.INT) > 4:
BIGCHUNK = 512 * 32
@@ -455,7 +457,7 @@
def _decompress_buf(self, data, max_length):
total_in = len(data)
- in_bufsize = min(total_in, UINT_MAX)
+ in_bufsize = min(total_in, MAX_BUFSIZE)
total_in -= in_bufsize
with rffi.scoped_nonmovingbuffer(data) as in_buf:
# setup the input and the size it can consume
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit