summaryrefslogtreecommitdiff
path: root/py/objint.c
diff options
context:
space:
mode:
authorDave Hylands <dhylands@gmail.com>2014-08-26 12:44:46 -0700
committerDave Hylands <dhylands@gmail.com>2014-08-26 19:15:04 -0700
commitb7f7c655ed4b54d9ff8ec04908199d04d38b7528 (patch)
tree51ae6e56729cf3b5a5e37a8d3ac0e753800cb4ef /py/objint.c
parentdb63660c19c9080d040ad48a5fb2a2ab233b7ede (diff)
Make int(b'123') work properly.
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 d088ae1a8..a77138350 100644
--- a/py/objint.c
+++ b/py/objint.c
@@ -57,7 +57,7 @@ STATIC mp_obj_t mp_obj_int_make_new(mp_obj_t type_in, uint n_args, uint n_kw, co
if (MP_OBJ_IS_INT(args[0])) {
// already an int (small or long), just return it
return args[0];
- } else if (MP_OBJ_IS_STR(args[0])) {
+ } else if (MP_OBJ_IS_STR_OR_BYTES(args[0])) {
// a string, parse it
uint l;
const char *s = mp_obj_str_get_data(args[0], &l);