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/objint_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/objint_mpz.c')
-rw-r--r-- | py/objint_mpz.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/py/objint_mpz.c b/py/objint_mpz.c index 6e1ee1a999..5cd4fb7bac 100644 --- a/py/objint_mpz.c +++ b/py/objint_mpz.c @@ -60,10 +60,13 @@ mp_obj_t int_binary_op(int op, mp_obj_t lhs_in, mp_obj_t rhs_in) { return MP_OBJ_NULL; } - if (op == RT_BINARY_OP_TRUE_DIVIDE || op == RT_BINARY_OP_INPLACE_TRUE_DIVIDE) { - machine_float_t flhs = mpz_as_float(zlhs); - machine_float_t frhs = mpz_as_float(zrhs); + if (0) { +#if MICROPY_ENABLE_FLOAT + } else if (op == RT_BINARY_OP_TRUE_DIVIDE || op == RT_BINARY_OP_INPLACE_TRUE_DIVIDE) { + mp_float_t flhs = mpz_as_float(zlhs); + mp_float_t frhs = mpz_as_float(zrhs); return mp_obj_new_float(flhs / frhs); +#endif } else if (op <= RT_BINARY_OP_POWER) { mp_obj_int_t *res = mp_obj_int_new_mpz(); |