diff options
| author | xyb <xieyanbo@gmail.com> | 2014-01-14 22:43:18 +0800 |
|---|---|---|
| committer | xyb <xieyanbo@gmail.com> | 2014-01-14 22:43:18 +0800 |
| commit | 82e61bdc24eb1d70a342c65e06de113e7375e361 (patch) | |
| tree | df38361299ebd499cc99b3c1fd989dbf6cac930b /py/obj.c | |
| parent | c178ea471ee30f32439741181d30d6a89830aabf (diff) | |
support int(str, basbase)
Diffstat (limited to 'py/obj.c')
| -rw-r--r-- | py/obj.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |
