unix, modtermios: Make it properly configurable; fix spelling mistake.

pull/813/merge
Damien George 2014-08-24 13:19:22 +01:00
rodzic 4f9ebade60
commit 25fc41dd31
2 zmienionych plików z 7 dodań i 2 usunięć

Wyświetl plik

@ -63,7 +63,7 @@ STATIC mp_obj_t mod_termios_tcgetattr(mp_obj_t fd_in) {
cc->items[i] = MP_OBJ_NEW_SMALL_INT(term.c_cc[i]);
} else {
// https://docs.python.org/3/library/termios.html says value is *string*,
// but now way unicode chars could be there.
// but no way unicode chars could be there.
cc->items[i] = mp_obj_new_bytes(&term.c_cc[i], 1);
}
}

Wyświetl plik

@ -84,13 +84,18 @@ extern const struct _mp_obj_module_t mp_module_ffi;
#else
#define MICROPY_PY_TIME_DEF
#endif
#if MICROPY_PY_TERMIOS
#define MICROPY_PY_TERMIOS_DEF { MP_OBJ_NEW_QSTR(MP_QSTR_termios), (mp_obj_t)&mp_module_termios },
#else
#define MICROPY_PY_TERMIOS_DEF
#endif
#define MICROPY_PORT_BUILTIN_MODULES \
MICROPY_PY_FFI_DEF \
MICROPY_PY_TIME_DEF \
{ MP_OBJ_NEW_QSTR(MP_QSTR_microsocket), (mp_obj_t)&mp_module_socket }, \
{ MP_OBJ_NEW_QSTR(MP_QSTR__os), (mp_obj_t)&mp_module_os }, \
{ MP_OBJ_NEW_QSTR(MP_QSTR_termios), (mp_obj_t)&mp_module_termios }, \
MICROPY_PY_TERMIOS_DEF \
// type definitions for the specific machine