summaryrefslogtreecommitdiffstatshomepage
path: root/py/objint.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-07-31 10:49:14 +0100
committerDamien George <damien.p.george@gmail.com>2014-07-31 10:49:14 +0100
commitbb4c6f35c627ab3487cdd6bafb4588cc633cd6a4 (patch)
tree6177f71ef43916008070e625f6eea0c7834f8c48 /py/objint.c
parentfa1ecda3fdaecd89b86bb63930a6521c8f63fe90 (diff)
downloadmicropython-bb4c6f35c627ab3487cdd6bafb4588cc633cd6a4.tar.gz
micropython-bb4c6f35c627ab3487cdd6bafb4588cc633cd6a4.zip
py: Make MP_OBJ_NEW_SMALL_INT cast arg to mp_int_t itself.
Addresses issue #724.
Diffstat (limited to 'py/objint.c')
-rw-r--r--py/objint.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/objint.c b/py/objint.c
index e351c3f394..c08bf7da6c 100644
--- a/py/objint.c
+++ b/py/objint.c
@@ -64,7 +64,7 @@ STATIC mp_obj_t mp_obj_int_make_new(mp_obj_t type_in, uint n_args, uint n_kw, co
return mp_parse_num_integer(s, l, 0);
#if MICROPY_PY_BUILTINS_FLOAT
} else if (MP_OBJ_IS_TYPE(args[0], &mp_type_float)) {
- return MP_OBJ_NEW_SMALL_INT((mp_int_t)(MICROPY_FLOAT_C_FUN(trunc)(mp_obj_float_get(args[0]))));
+ return MP_OBJ_NEW_SMALL_INT((MICROPY_FLOAT_C_FUN(trunc)(mp_obj_float_get(args[0]))));
#endif
} else {
// try to convert to small int (eg from bool)