[pypy-commit] pypy disable_merge_different_int_types: translation fix for binascii
bivab
noreply at buildbot.pypy.org
Mon Nov 28 15:55:46 CET 2011
Author: David Schneider <david.schneider at picle.org>
Branch: disable_merge_different_int_types
Changeset: r49906:663969efb61d
Date: 2011-11-26 15:33 +0100
http://bitbucket.org/pypy/pypy/changeset/663969efb61d/
Log: translation fix for binascii
diff --git a/pypy/module/binascii/interp_crc32.py b/pypy/module/binascii/interp_crc32.py
--- a/pypy/module/binascii/interp_crc32.py
+++ b/pypy/module/binascii/interp_crc32.py
@@ -69,7 +69,7 @@
# in the following loop, we have always 0 <= crc < 2**32
for c in data:
- crc = crc_32_tab[(crc & 0xff) ^ ord(c)] ^ (crc >> 8)
+ crc = crc_32_tab[(crc & 0xff) ^ r_uint(ord(c))] ^ (crc >> 8)
crc = ~intmask(rffi.cast(rffi.INT, crc)) # unsigned => 32-bit signed
return space.wrap(crc)
More information about the pypy-commit
mailing list