• Kevin Modzelewski's avatar
    Support the different int formats for struct.pack · b9abde9d
    Kevin Modzelewski authored
    The struct module just defers to PyLong_As* methods, so the
    actual change here is improving our implementation of
    _PyLong_AsByteArray, to add
    - overflow and underflow checking
    - twos-complement conversion (mpz_export ignores the sign)
    - endianness
    b9abde9d
int.cpp 36.6 KB