diff options
-rw-r--r-- | py/mpconfig.h | 6 | ||||
-rw-r--r-- | unix/mpconfigport.h | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h index 5e717ad0f6..08dd497c5f 100644 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -819,6 +819,12 @@ typedef double mp_float_t; #define MICROPY_PORT_ROOT_POINTERS #endif +#if MICROPY_PY_OS_DUPTERM +#define MP_ROOT_PTR_DUPTERM_OBJ mp_obj_t term_obj +#else +#define MP_ROOT_PTR_DUPTERM_OBJ +#endif + /*****************************************************************************/ /* Miscellaneous settings */ diff --git a/unix/mpconfigport.h b/unix/mpconfigport.h index 2061b48950..a5f32a0812 100644 --- a/unix/mpconfigport.h +++ b/unix/mpconfigport.h @@ -244,18 +244,16 @@ extern const struct _mp_obj_fun_builtin_t mp_builtin_open_obj; #define MP_STATE_PORT MP_STATE_VM #if MICROPY_PY_OS_DUPTERM -#define ROOT_POINTERS_1 mp_obj_t term_obj #include <stddef.h> void mp_hal_dupterm_tx_strn(const char *str, size_t len); #else -#define ROOT_POINTERS_1 #define mp_hal_dupterm_tx_strn(s, l) #endif #define MICROPY_PORT_ROOT_POINTERS \ const char *readline_hist[50]; \ mp_obj_t keyboard_interrupt_obj; \ - ROOT_POINTERS_1; \ + MP_ROOT_PTR_DUPTERM_OBJ; \ void *mmap_region_head; \ // We need to provide a declaration/definition of alloca() |