Skip to content

Commit 00ee84e

Browse files
committed
py: Clean up instantiation of dupterm object.
To comply with already established scheme for extmod's.
1 parent 9bbfd5e commit 00ee84e

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

py/mpconfig.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -819,12 +819,6 @@ typedef double mp_float_t;
819819
#define MICROPY_PORT_ROOT_POINTERS
820820
#endif
821821

822-
#if MICROPY_PY_OS_DUPTERM
823-
#define MP_ROOT_PTR_DUPTERM_OBJ mp_obj_t term_obj
824-
#else
825-
#define MP_ROOT_PTR_DUPTERM_OBJ
826-
#endif
827-
828822
/*****************************************************************************/
829823
/* Miscellaneous settings */
830824

py/mpstate.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,11 @@ typedef struct _mp_state_vm_t {
127127
MICROPY_PORT_ROOT_POINTERS
128128

129129
// root pointers for extmod
130+
131+
#if MICROPY_PY_OS_DUPTERM
132+
mp_obj_t term_obj;
133+
#endif
134+
130135
#if MICROPY_PY_LWIP_SLIP
131136
mp_obj_t lwip_slip_stream;
132137
#endif

py/qstrdefs.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -665,3 +665,7 @@ Q(writeblocks)
665665
Q(sync)
666666
Q(count)
667667
#endif
668+
669+
#if MICROPY_PY_OS_DUPTERM
670+
Q(dupterm)
671+
#endif

unix/mpconfigport.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,6 @@ void mp_hal_dupterm_tx_strn(const char *str, size_t len);
253253
#define MICROPY_PORT_ROOT_POINTERS \
254254
const char *readline_hist[50]; \
255255
mp_obj_t keyboard_interrupt_obj; \
256-
MP_ROOT_PTR_DUPTERM_OBJ; \
257256
void *mmap_region_head; \
258257

259258
// We need to provide a declaration/definition of alloca()

0 commit comments

Comments
 (0)