diff options
author | Damien George <damien.p.george@gmail.com> | 2017-06-08 00:40:38 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2017-06-08 00:40:38 +1000 |
commit | 326e8860abd79b631fe66e07ad0fddf0089db9ec (patch) | |
tree | 1fcd52f1e0d87c0684e67fb226534d19d8261b8e | |
parent | 72732fea1a041b94448d98ad4fd53545caa758ab (diff) | |
download | micropython-326e8860abd79b631fe66e07ad0fddf0089db9ec.tar.gz micropython-326e8860abd79b631fe66e07ad0fddf0089db9ec.zip |
py/objstr: Allow to compile with obj-repr D, and unicode disabled.
-rw-r--r-- | py/objstr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/py/objstr.c b/py/objstr.c index 1d2a280453..e758dd0062 100644 --- a/py/objstr.c +++ b/py/objstr.c @@ -2135,7 +2135,7 @@ typedef struct _mp_obj_str8_it_t { #if !MICROPY_PY_BUILTINS_STR_UNICODE STATIC mp_obj_t str_it_iternext(mp_obj_t self_in) { - mp_obj_str8_it_t *self = self_in; + mp_obj_str8_it_t *self = MP_OBJ_TO_PTR(self_in); GET_STR_DATA_LEN(self->str, str, len); if (self->cur < len) { mp_obj_t o_out = mp_obj_new_str((const char*)str + self->cur, 1, true); @@ -2153,7 +2153,7 @@ STATIC mp_obj_t mp_obj_new_str_iterator(mp_obj_t str, mp_obj_iter_buf_t *iter_bu o->iternext = str_it_iternext; o->str = str; o->cur = 0; - return o; + return MP_OBJ_FROM_PTR(o); } #endif |