Author: Carl Friedrich Bolz-Tereick <cfb...@gmx.de>
Branch: json-decoder-maps
Changeset: r97566:3a51f8eb6272
Date: 2019-09-20 12:32 +0200
http://bitbucket.org/pypy/pypy/changeset/3a51f8eb6272/

Log:    fix bytes/WORD_SIZE confusion (thanks Armin)

diff --git a/pypy/module/_pypyjson/simd.py b/pypy/module/_pypyjson/simd.py
--- a/pypy/module/_pypyjson/simd.py
+++ b/pypy/module/_pypyjson/simd.py
@@ -194,8 +194,8 @@
         bits |= ord(ch)
 
         word |= ord(ch) << shift
-        shift += WORD_SIZE
-        if shift == WORD_SIZE * WORD_SIZE:
+        shift += 8
+        if shift == WORD_SIZE * 8:
             strhash = intmask((1000003 * strhash) ^ word)
             shift = 0
             word = 0
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to