mirror of
https://github.com/micropython/micropython.git
synced 2025-12-15 17:30:14 +01:00
shared/readline: Use MP_REGISTER_ROOT_POINTER().
This uses MP_REGISTER_ROOT_POINTER() to register the readline_history root pointer array used by shared/readline.c and removes the registration from all mpconfigport.h files. This also required adding a new MICROPY_READLINE_HISTORY_SIZE config option since not all ports used the same sized array. Signed-off-by: David Lechner <david@pybricks.com>
This commit is contained in:
committed by
Damien George
parent
fc3d7ae11b
commit
81dbea1ce3
@@ -68,6 +68,7 @@ SRC_C += $(SRC_MOD)
|
||||
|
||||
SRC_CXX += $(SRC_MOD_CXX)
|
||||
|
||||
SRC_QSTR += shared/readline/readline.c
|
||||
SRC_QSTR += $(SRC_MOD) $(SRC_MOD_CXX)
|
||||
|
||||
OBJ += $(PY_CORE_O) $(addprefix $(BUILD)/, $(SRC_C:.c=.o))
|
||||
|
||||
@@ -41,6 +41,3 @@ typedef long mp_off_t;
|
||||
#endif
|
||||
|
||||
#define MP_STATE_PORT MP_STATE_VM
|
||||
|
||||
#define MICROPY_PORT_ROOT_POINTERS \
|
||||
const char *readline_hist[8];
|
||||
|
||||
Reference in New Issue
Block a user