Skip to content

Commit 326e886

Browse files
committed
py/objstr: Allow to compile with obj-repr D, and unicode disabled.
1 parent 72732fe commit 326e886

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

py/objstr.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2135,7 +2135,7 @@ typedef struct _mp_obj_str8_it_t {
21352135

21362136
#if !MICROPY_PY_BUILTINS_STR_UNICODE
21372137
STATIC mp_obj_t str_it_iternext(mp_obj_t self_in) {
2138-
mp_obj_str8_it_t *self = self_in;
2138+
mp_obj_str8_it_t *self = MP_OBJ_TO_PTR(self_in);
21392139
GET_STR_DATA_LEN(self->str, str, len);
21402140
if (self->cur < len) {
21412141
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
21532153
o->iternext = str_it_iternext;
21542154
o->str = str;
21552155
o->cur = 0;
2156-
return o;
2156+
return MP_OBJ_FROM_PTR(o);
21572157
}
21582158
#endif
21592159

0 commit comments

Comments
 (0)