summaryrefslogtreecommitdiffstatshomepage
path: root/py
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-02-14 19:12:57 +0200
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-02-14 19:12:57 +0200
commitdc3eb55e6afa037e9bcea1baeb8291d17744c205 (patch)
tree949d0c2ab1251b11d41f398aede999b875db17ba /py
parente5cff5b2233317cb7f8cb8465940c4e2f2aa1b9d (diff)
downloadmicropython-dc3eb55e6afa037e9bcea1baeb8291d17744c205.tar.gz
micropython-dc3eb55e6afa037e9bcea1baeb8291d17744c205.zip
py/obj.h: If not float support is enabled, define mp_obj_is_float(o) to false.
We have so many configuration options, that finally having shortcuts like this is helpful and cuts on number of ifdef's.
Diffstat (limited to 'py')
-rw-r--r--py/obj.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/py/obj.h b/py/obj.h
index bfdceeb4e8..3d03394735 100644
--- a/py/obj.h
+++ b/py/obj.h
@@ -710,6 +710,8 @@ mp_obj_t mp_obj_float_binary_op(mp_uint_t op, mp_float_t lhs_val, mp_obj_t rhs);
// complex
void mp_obj_complex_get(mp_obj_t self_in, mp_float_t *real, mp_float_t *imag);
mp_obj_t mp_obj_complex_binary_op(mp_uint_t op, mp_float_t lhs_real, mp_float_t lhs_imag, mp_obj_t rhs_in); // can return MP_OBJ_NULL if op not supported
+#else
+#define mp_obj_is_float(o) (false)
#endif
// tuple