diff options
author | Damien George <damien.p.george@gmail.com> | 2014-07-31 13:41:43 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-07-31 13:41:43 +0000 |
commit | c9aa58e6381018cca2513e3468363af0b5442d1f (patch) | |
tree | 47fa6e3a4971fe4053b08bb085710c325d11bfd0 /unix/modos.c | |
parent | 94fbe9711a1179b3c4d0eb2e9822787d90231719 (diff) | |
download | micropython-c9aa58e6381018cca2513e3468363af0b5442d1f.tar.gz micropython-c9aa58e6381018cca2513e3468363af0b5442d1f.zip |
py: Improve handling of long-int overflow.
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).
Diffstat (limited to 'unix/modos.c')
0 files changed, 0 insertions, 0 deletions