py: More robust int conversion and overflow checking.

This commit is contained in:
Damien George
2014-04-03 11:00:54 +00:00
parent a58a7aefbd
commit 8270e3853d
6 changed files with 63 additions and 9 deletions

View File

@@ -71,6 +71,7 @@ mpz_t *mpz_div(const mpz_t *lhs, const mpz_t *rhs);
mpz_t *mpz_mod(const mpz_t *lhs, const mpz_t *rhs);
machine_int_t mpz_as_int(const mpz_t *z);
bool mpz_as_int_checked(const mpz_t *z, machine_int_t *value);
#if MICROPY_ENABLE_FLOAT
mp_float_t mpz_as_float(const mpz_t *z);
#endif