We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 772c73f commit 2ae6697Copy full SHA for 2ae6697
1 file changed
py/objstringio.c
@@ -95,6 +95,7 @@ STATIC mp_uint_t stringio_write(mp_obj_t o_in, const void *buf, mp_uint_t size,
95
STATIC mp_obj_t stringio_getvalue(mp_obj_t self_in) {
96
mp_obj_stringio_t *self = MP_OBJ_TO_PTR(self_in);
97
check_stringio_is_open(self);
98
+ // TODO: Try to avoid copying string
99
return mp_obj_new_str_of_type(STREAM_TO_CONTENT_TYPE(self), (byte*)self->vstr->buf, self->vstr->len);
100
}
101
STATIC MP_DEFINE_CONST_FUN_OBJ_1(stringio_getvalue_obj, stringio_getvalue);
0 commit comments