summaryrefslogtreecommitdiffstatshomepage
path: root/unix/modtermios.c
diff options
context:
space:
mode:
Diffstat (limited to 'unix/modtermios.c')
-rw-r--r--unix/modtermios.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/unix/modtermios.c b/unix/modtermios.c
index 393c6fdcf1..c49014c940 100644
--- a/unix/modtermios.c
+++ b/unix/modtermios.c
@@ -126,13 +126,13 @@ STATIC mp_obj_t mod_termios_setraw(mp_obj_t fd_in) {
}
STATIC MP_DEFINE_CONST_FUN_OBJ_1(mod_termios_setraw_obj, mod_termios_setraw);
-STATIC const mp_map_elem_t mp_module_termios_globals_table[] = {
- { MP_OBJ_NEW_QSTR(MP_QSTR___name__), MP_OBJ_NEW_QSTR(MP_QSTR_termios) },
- { MP_OBJ_NEW_QSTR(MP_QSTR_tcgetattr), (mp_obj_t)&mod_termios_tcgetattr_obj },
- { MP_OBJ_NEW_QSTR(MP_QSTR_tcsetattr), (mp_obj_t)&mod_termios_tcsetattr_obj },
- { MP_OBJ_NEW_QSTR(MP_QSTR_setraw), (mp_obj_t)&mod_termios_setraw_obj },
+STATIC const mp_rom_map_elem_t mp_module_termios_globals_table[] = {
+ { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_termios) },
+ { MP_ROM_QSTR(MP_QSTR_tcgetattr), MP_ROM_PTR(&mod_termios_tcgetattr_obj) },
+ { MP_ROM_QSTR(MP_QSTR_tcsetattr), MP_ROM_PTR(&mod_termios_tcsetattr_obj) },
+ { MP_ROM_QSTR(MP_QSTR_setraw), MP_ROM_PTR(&mod_termios_setraw_obj) },
-#define C(name) { MP_OBJ_NEW_QSTR(MP_QSTR_ ## name), MP_OBJ_NEW_SMALL_INT(name) }
+#define C(name) { MP_ROM_QSTR(MP_QSTR_ ## name), MP_ROM_INT(name) }
C(TCSANOW),
C(B9600),