summaryrefslogtreecommitdiffstatshomepage
path: root/py/objstringio.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/objstringio.c')
-rw-r--r--py/objstringio.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/py/objstringio.c b/py/objstringio.c
index 1a083449ba..a3c66ed010 100644
--- a/py/objstringio.c
+++ b/py/objstringio.c
@@ -170,12 +170,6 @@ STATIC mp_obj_t stringio_getvalue(mp_obj_t self_in) {
}
STATIC MP_DEFINE_CONST_FUN_OBJ_1(stringio_getvalue_obj, stringio_getvalue);
-STATIC mp_obj_t stringio___exit__(size_t n_args, const mp_obj_t *args) {
- (void)n_args;
- return mp_stream_close(args[0]);
-}
-STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(stringio___exit___obj, 4, 4, stringio___exit__);
-
STATIC mp_obj_stringio_t *stringio_new(const mp_obj_type_t *type) {
mp_obj_stringio_t *o = mp_obj_malloc(mp_obj_stringio_t, type);
o->pos = 0;
@@ -232,7 +226,7 @@ STATIC const mp_rom_map_elem_t stringio_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_close), MP_ROM_PTR(&mp_stream_close_obj) },
{ MP_ROM_QSTR(MP_QSTR_getvalue), MP_ROM_PTR(&stringio_getvalue_obj) },
{ MP_ROM_QSTR(MP_QSTR___enter__), MP_ROM_PTR(&mp_identity_obj) },
- { MP_ROM_QSTR(MP_QSTR___exit__), MP_ROM_PTR(&stringio___exit___obj) },
+ { MP_ROM_QSTR(MP_QSTR___exit__), MP_ROM_PTR(&mp_stream___exit___obj) },
};
STATIC MP_DEFINE_CONST_DICT(stringio_locals_dict, stringio_locals_dict_table);