diff options
author | Damien George <damien.p.george@gmail.com> | 2014-03-08 15:04:54 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-03-08 15:04:54 +0000 |
commit | 5260810d70311b9baaea249ef4a8bcd80f56f5dc (patch) | |
tree | 226c085f1b6ea56b75fc17096927cf75a246451b /py/mpz.c | |
parent | fdf0da54360dbbf46dc761a9dfec6ac91dffae8e (diff) | |
download | micropython-5260810d70311b9baaea249ef4a8bcd80f56f5dc.tar.gz micropython-5260810d70311b9baaea249ef4a8bcd80f56f5dc.zip |
py: Wrap mpz float functions in MICROPY_ENABLE_FLOAT.
Diffstat (limited to 'py/mpz.c')
-rw-r--r-- | py/mpz.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1001,8 +1001,9 @@ machine_int_t mpz_as_int(const mpz_t *i) { return val; } -machine_float_t mpz_as_float(const mpz_t *i) { - machine_float_t val = 0; +#if MICROPY_ENABLE_FLOAT +mp_float_t mpz_as_float(const mpz_t *i) { + mp_float_t val = 0; mpz_dig_t *d = i->dig + i->len; while (--d >= i->dig) { @@ -1015,6 +1016,7 @@ machine_float_t mpz_as_float(const mpz_t *i) { return val; } +#endif uint mpz_as_str_size(const mpz_t *i, uint base) { if (base < 2 || base > 32) { |