diff options
author | Damien George <damien.p.george@gmail.com> | 2015-08-20 23:30:12 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2015-10-20 12:35:17 +0100 |
commit | aaef1851a748af95f8b105ef2d1d4f35e6ede02b (patch) | |
tree | dec9fac8e9ed288aa0b4a2abfed093208c2dd12e /py/modbuiltins.c | |
parent | 60401d461ab41d94eeb174ae0f4db9a57d43880a (diff) |
py: Add mp_obj_is_float function (macro) and use it where appropriate.
Diffstat (limited to 'py/modbuiltins.c')
-rw-r--r-- | py/modbuiltins.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/py/modbuiltins.c b/py/modbuiltins.c index 45fb3ffd9..dd8499ba6 100644 --- a/py/modbuiltins.c +++ b/py/modbuiltins.c @@ -93,7 +93,7 @@ STATIC mp_obj_t mp_builtin_abs(mp_obj_t o_in) { if (0) { // dummy #if MICROPY_PY_BUILTINS_FLOAT - } else if (MP_OBJ_IS_TYPE(o_in, &mp_type_float)) { + } else if (mp_obj_is_float(o_in)) { mp_float_t value = mp_obj_float_get(o_in); // TODO check for NaN etc if (value < 0) { |