Author: Armin Rigo <[email protected]>
Branch:
Changeset: r91245:5ebcb8f995fd
Date: 2017-05-11 12:10 +0200
http://bitbucket.org/pypy/pypy/changeset/5ebcb8f995fd/
Log: in theory, this is a fix
diff --git a/pypy/objspace/std/intobject.py b/pypy/objspace/std/intobject.py
--- a/pypy/objspace/std/intobject.py
+++ b/pypy/objspace/std/intobject.py
@@ -625,7 +625,7 @@
# use r_uint to perform a single comparison (this whole function is
# getting inlined into every caller so keeping the branching to a
# minimum is a good idea)
- index = r_uint(x - lower)
+ index = r_uint(x) - r_uint(lower)
if index >= r_uint(upper - lower):
w_res = instantiate(W_IntObject)
else:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit