summaryrefslogtreecommitdiffstatshomepage
path: root/py/obj.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-04-11 11:16:53 +0000
committerDamien George <damien.p.george@gmail.com>2014-04-11 11:16:53 +0000
commita5c82a8187c16b9100cdc9615e945d01be768e89 (patch)
tree9928cc02cbd4f9102b8c2dd8b2ce9b53860056ad /py/obj.c
parente22d76e73b67aafa0e8c4a05a1f2b6421564dcd5 (diff)
downloadmicropython-a5c82a8187c16b9100cdc9615e945d01be768e89.tar.gz
micropython-a5c82a8187c16b9100cdc9615e945d01be768e89.zip
py: Convert some macros to inline functions (in obj.h).
Also convert mp_obj_is_integer to an inline function. Overall this decreased code size (at least on 32-bit x86 machine).
Diffstat (limited to 'py/obj.c')
-rw-r--r--py/obj.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/py/obj.c b/py/obj.c
index 0cd8117819..7666855e5c 100644
--- a/py/obj.c
+++ b/py/obj.c
@@ -99,11 +99,6 @@ int mp_obj_is_true(mp_obj_t arg) {
}
}
-// returns true if o_in is bool, small int, or long int
-bool mp_obj_is_integer(mp_obj_t o_in) {
- return MP_OBJ_IS_INT(o_in) || MP_OBJ_IS_TYPE(o_in, &mp_type_bool);
-}
-
bool mp_obj_is_callable(mp_obj_t o_in) {
return mp_obj_get_type(o_in)->call != NULL;
}