[pypy-svn] r76092 - pypy/branch/fast-forward/pypy/rlib/rstruct
benjamin at codespeak.net
benjamin at codespeak.net
Sat Jul 10 19:03:31 CEST 2010
Author: benjamin
Date: Sat Jul 10 19:03:30 2010
New Revision: 76092
Modified:
pypy/branch/fast-forward/pypy/rlib/rstruct/nativefmttable.py
pypy/branch/fast-forward/pypy/rlib/rstruct/standardfmttable.py
Log:
Cpython is now good and checks ranges
Modified: pypy/branch/fast-forward/pypy/rlib/rstruct/nativefmttable.py
==============================================================================
--- pypy/branch/fast-forward/pypy/rlib/rstruct/nativefmttable.py (original)
+++ pypy/branch/fast-forward/pypy/rlib/rstruct/nativefmttable.py Sat Jul 10 19:03:30 2010
@@ -127,8 +127,7 @@
pack = pack_bool
unpack = unpack_bool
else:
- cpython_checks_range = fmtchar in 'bBhH'
- pack = std.make_int_packer(size, signed, cpython_checks_range)
+ pack = std.make_int_packer(size, signed, True)
unpack = std.make_int_unpacker(size, signed)
native_fmttable[fmtchar] = {'size': size,
Modified: pypy/branch/fast-forward/pypy/rlib/rstruct/standardfmttable.py
==============================================================================
--- pypy/branch/fast-forward/pypy/rlib/rstruct/standardfmttable.py (original)
+++ pypy/branch/fast-forward/pypy/rlib/rstruct/standardfmttable.py Sat Jul 10 19:03:30 2010
@@ -238,9 +238,8 @@
for c, size in [('b', 1), ('h', 2), ('i', 4), ('l', 4), ('q', 8)]:
standard_fmttable[c] = {'size': size,
- 'pack': make_int_packer(size, True, False),
+ 'pack': make_int_packer(size, True, True),
'unpack': make_int_unpacker(size, True)}
standard_fmttable[c.upper()] = {'size': size,
- 'pack': make_int_packer(size, False,
- False),
+ 'pack': make_int_packer(size, False, True),
'unpack': make_int_unpacker(size, False)}
More information about the Pypy-commit
mailing list