diff options
Diffstat (limited to 'py/objstringio.c')
-rw-r--r-- | py/objstringio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/py/objstringio.c b/py/objstringio.c index 7a3e0f8939..d9ad604b41 100644 --- a/py/objstringio.c +++ b/py/objstringio.c @@ -83,7 +83,7 @@ STATIC machine_int_t stringio_write(mp_obj_t o_in, const void *buf, machine_uint STATIC mp_obj_t stringio_getvalue(mp_obj_t self_in) { mp_obj_stringio_t *self = self_in; - return str_new(STREAM_TO_CONTENT_TYPE(self), (byte*)self->vstr->buf, self->vstr->len); + return mp_obj_new_str_of_type(STREAM_TO_CONTENT_TYPE(self), (byte*)self->vstr->buf, self->vstr->len); } STATIC MP_DEFINE_CONST_FUN_OBJ_1(stringio_getvalue_obj, stringio_getvalue); |