• Tim Peters's avatar
    Added q/Q standard (x-platform 8-byte ints) mode in struct module. · 7a3bfc3a
    Tim Peters yazdı
    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.
    7a3bfc3a
test_struct.py 10.1 KB