summaryrefslogtreecommitdiff
path: root/py/obj.c
diff options
context:
space:
mode:
authorxyb <xieyanbo@gmail.com>2014-01-14 22:43:18 +0800
committerxyb <xieyanbo@gmail.com>2014-01-14 22:43:18 +0800
commit82e61bdc24eb1d70a342c65e06de113e7375e361 (patch)
treedf38361299ebd499cc99b3c1fd989dbf6cac930b /py/obj.c
parentc178ea471ee30f32439741181d30d6a89830aabf (diff)
support int(str, basbase)
Diffstat (limited to 'py/obj.c')
-rw-r--r--py/obj.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/obj.c b/py/obj.c
index 73ffe5281..866b9aaef 100644
--- a/py/obj.c
+++ b/py/obj.c
@@ -158,7 +158,7 @@ machine_int_t mp_obj_get_int_base(mp_obj_t arg, mp_obj_t base_arg) {
if (base_arg == 0) {
value = qstr_str(mp_obj_str_get(arg));
return (machine_int_t)strtonum(value, 0);
- } else if (MP_OBJ_IS_TYPE(base_arg, &int_type)) {
+ } else if (MP_OBJ_IS_SMALL_INT(base_arg)) {
base = MP_OBJ_SMALL_INT_VALUE(base_arg);
value = qstr_str(mp_obj_str_get(arg));
return (machine_int_t)strtonum(value, base);