summaryrefslogtreecommitdiffstatshomepage
path: root/py/obj.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-01-18 14:15:48 +0000
committerDamien George <damien.p.george@gmail.com>2014-01-18 14:15:48 +0000
commit632cf5710ca49cdcc4593672650ca53092dd435c (patch)
tree3e0e9a286e0f6eadda8b3f9de91642c1c4e2d2d9 /py/obj.c
parent20006dbba9d2d84ead036fdfab7190e88b2337ce (diff)
parentd26b379eec155ddd7a4aa64057c3d0507eee79f5 (diff)
downloadmicropython-632cf5710ca49cdcc4593672650ca53092dd435c.tar.gz
micropython-632cf5710ca49cdcc4593672650ca53092dd435c.zip
Merge branch 'master' of github.com:dpgeorge/micropython
Diffstat (limited to 'py/obj.c')
-rw-r--r--py/obj.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/py/obj.c b/py/obj.c
index bf7013ae41..c6e665376a 100644
--- a/py/obj.c
+++ b/py/obj.c
@@ -155,6 +155,8 @@ machine_int_t mp_obj_get_int(mp_obj_t arg) {
return 1;
} else if (MP_OBJ_IS_SMALL_INT(arg)) {
return MP_OBJ_SMALL_INT_VALUE(arg);
+ } else if (MP_OBJ_IS_TYPE(arg, &int_type)) {
+ return mp_obj_int_get_checked(arg);
#if MICROPY_ENABLE_FLOAT
} else if (MP_OBJ_IS_TYPE(arg, &float_type)) {
// TODO work out if this should be floor, ceil or trunc