summaryrefslogtreecommitdiffstatshomepage
path: root/py/objint.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-08-27 09:21:41 +0100
committerDamien George <damien.p.george@gmail.com>2014-08-27 09:21:41 +0100
commita97e091d4e80bbdb05f4bb27f18b905b50daf018 (patch)
treea167161db4f7b57d23445314bd0f07bc139ac271 /py/objint.c
parentf3c3010ffccc6cee0795c0491e2a686994bd0b34 (diff)
parenta75b02ea9be41c27b87fd80ad37e7c26b4583fad (diff)
downloadmicropython-a97e091d4e80bbdb05f4bb27f18b905b50daf018.tar.gz
micropython-a97e091d4e80bbdb05f4bb27f18b905b50daf018.zip
Merge branch 'dhylands-int-bytes'
Diffstat (limited to 'py/objint.c')
-rw-r--r--py/objint.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/py/objint.c b/py/objint.c
index d088ae1a80..c190c1800b 100644
--- a/py/objint.c
+++ b/py/objint.c
@@ -38,6 +38,7 @@
#include "smallint.h"
#include "mpz.h"
#include "objint.h"
+#include "objstr.h"
#include "runtime0.h"
#include "runtime.h"
@@ -57,7 +58,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);