diff options
| author | Dan Halbert <halbert@halwitz.org> | 2017-08-25 22:17:07 -0400 |
|---|---|---|
| committer | Dan Halbert <halbert@halwitz.org> | 2017-08-25 22:17:07 -0400 |
| commit | ef61b5ecb59e9b4e37e3e3c023c62d583c23eb16 (patch) | |
| tree | 45a798fbed0dc673304597b29e0b60174195ce79 /py/modio.c | |
| parent | 266be307770abe11c220eb493388807920914b7a (diff) | |
| parent | 1f78e7a43130acfa4bedf16c1007a1b0f37c75c3 (diff) | |
Initial merge of micropython v1.9.2 into circuitpython 2.0.0 (in development) master.
cpx build compiles and loads and works in repl; test suite not run yet
esp8266 not tested yet
Diffstat (limited to 'py/modio.c')
| -rw-r--r-- | py/modio.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/py/modio.c b/py/modio.c index b6770194a..9263b5949 100644 --- a/py/modio.c +++ b/py/modio.c @@ -1,5 +1,5 @@ /* - * This file is part of the Micro Python project, http://micropython.org/ + * This file is part of the MicroPython project, http://micropython.org/ * * The MIT License (MIT) * @@ -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 |
