Skip to content
Snippets Groups Projects
Commit 45645043 authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

py/modio: BufferedWriter: Convert to mp_rom_map_elem_t.

parent f578947a
No related branches found
No related tags found
No related merge requests found
......@@ -112,9 +112,9 @@ STATIC mp_obj_t bufwriter_flush(mp_obj_t self_in) {
}
STATIC MP_DEFINE_CONST_FUN_OBJ_1(bufwriter_flush_obj, bufwriter_flush);
STATIC const mp_map_elem_t bufwriter_locals_dict_table[] = {
{ MP_OBJ_NEW_QSTR(MP_QSTR_write), (mp_obj_t)&mp_stream_write_obj },
{ MP_OBJ_NEW_QSTR(MP_QSTR_flush), (mp_obj_t)&bufwriter_flush_obj },
STATIC const mp_rom_map_elem_t bufwriter_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_write), MP_ROM_PTR(&mp_stream_write_obj) },
{ MP_ROM_QSTR(MP_QSTR_flush), MP_ROM_PTR(&bufwriter_flush_obj) },
};
STATIC MP_DEFINE_CONST_DICT(bufwriter_locals_dict, bufwriter_locals_dict_table);
......@@ -127,7 +127,7 @@ STATIC const mp_obj_type_t bufwriter_type = {
.name = MP_QSTR_BufferedWriter,
.make_new = bufwriter_make_new,
.protocol = &bufwriter_stream_p,
.locals_dict = (mp_obj_t)&bufwriter_locals_dict,
.locals_dict = (mp_obj_dict_t*)&bufwriter_locals_dict,
};
#endif // MICROPY_PY_IO_BUFFEREDWRITER
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment