Author: Matti Picus <[email protected]>
Branch: py3.6
Changeset: r97337:cfb972269866
Date: 2019-08-29 20:59 +0300
http://bitbucket.org/pypy/pypy/changeset/cfb972269866/
Log: merge default into py3.6
diff --git a/rpython/rlib/rsiphash.py b/rpython/rlib/rsiphash.py
--- a/rpython/rlib/rsiphash.py
+++ b/rpython/rlib/rsiphash.py
@@ -170,10 +170,12 @@
# unicode strings where CPython uses 2 bytes per character.
addr = rstr._get_raw_buf_unicode(rstr.UNICODE, ll_s, 0)
SZ = rffi.sizeof(rstr.UNICODE.chars.OF)
- for i in range(length):
+ i = 0
+ while i < length:
if ord(ll_s.chars[i]) > 0xFF:
length *= SZ
break
+ i += 1
else:
x = _siphash24(addr, length, SZ)
keepalive_until_here(ll_s)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit