• Damien George's avatar
    py: Improve handling of long-int overflow. · c9aa58e6
    Damien George authored
    This removes mpz_as_int, since that was a terrible function (it
    implemented saturating conversion).
    Use mpz_as_int_checked and mpz_as_uint_checked.  These now work
    correctly (they previously had wrong overflow checking, eg
    print(chr(10000000000000)) on 32-bit machine would incorrectly convert
    this large number to a small int).