]> granicus.if.org Git - python/commit
Added q/Q standard (x-platform 8-byte ints) mode in struct module.
authorTim Peters <tim.peters@gmail.com>
Tue, 12 Jun 2001 01:22:22 +0000 (01:22 +0000)
committerTim Peters <tim.peters@gmail.com>
Tue, 12 Jun 2001 01:22:22 +0000 (01:22 +0000)
commit7a3bfc3a472dafc42d20845389eb79db8af0b046
tree5b59ec1db42d4559a21af550c3b068b053ac79d2
parentac4797a12eed2fb5bcc68ae6e768e5ab4ec5b422
Added q/Q standard (x-platform 8-byte ints) mode in struct module.
This completes the q/Q project.

longobject.c _PyLong_AsByteArray:  The original code had a gross bug:
the most-significant Python digit doesn't necessarily have SHIFT
significant bits, and you really need to count how many copies of the sign
bit it has else spurious overflow errors result.

test_struct.py:  This now does exhaustive std q/Q testing at, and on both
sides of, all relevant power-of-2 boundaries, both positive and negative.

NEWS:  Added brief dict news while I was at it.
Doc/lib/libstruct.tex
Lib/test/test_struct.py
Misc/NEWS
Modules/structmodule.c
Objects/longobject.c