py: Clean up instantiation of dupterm object.

To comply with already established scheme for extmod's.
pull/1776/head
Paul Sokolovsky 2016-01-01 14:19:26 +02:00
rodzic 9bbfd5efd4
commit 00ee84e1e1
4 zmienionych plików z 9 dodań i 7 usunięć

Wyświetl plik

@ -819,12 +819,6 @@ 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 */

Wyświetl plik

@ -127,6 +127,11 @@ typedef struct _mp_state_vm_t {
MICROPY_PORT_ROOT_POINTERS
// root pointers for extmod
#if MICROPY_PY_OS_DUPTERM
mp_obj_t term_obj;
#endif
#if MICROPY_PY_LWIP_SLIP
mp_obj_t lwip_slip_stream;
#endif

Wyświetl plik

@ -665,3 +665,7 @@ Q(writeblocks)
Q(sync)
Q(count)
#endif
#if MICROPY_PY_OS_DUPTERM
Q(dupterm)
#endif

Wyświetl plik

@ -253,7 +253,6 @@ void mp_hal_dupterm_tx_strn(const char *str, size_t len);
#define MICROPY_PORT_ROOT_POINTERS \
const char *readline_hist[50]; \
mp_obj_t keyboard_interrupt_obj; \
MP_ROOT_PTR_DUPTERM_OBJ; \
void *mmap_region_head; \
// We need to provide a declaration/definition of alloca()