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
@@ -129,6 +129,9 @@
|
||||
#define MICROPY_READER_POSIX (1)
|
||||
#define MICROPY_READER_VFS (1)
|
||||
#define MICROPY_USE_READLINE_HISTORY (1)
|
||||
#ifndef MICROPY_READLINE_HISTORY_SIZE
|
||||
#define MICROPY_READLINE_HISTORY_SIZE 50
|
||||
#endif
|
||||
#define MICROPY_HELPER_LEXER_UNIX (1)
|
||||
#ifndef MICROPY_FLOAT_IMPL
|
||||
#define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_DOUBLE)
|
||||
@@ -302,7 +305,6 @@ struct _mp_bluetooth_nimble_malloc_t;
|
||||
#endif
|
||||
|
||||
#define MICROPY_PORT_ROOT_POINTERS \
|
||||
const char *readline_hist[50]; \
|
||||
void *mmap_region_head; \
|
||||
MICROPY_BLUETOOTH_ROOT_POINTERS \
|
||||
|
||||
|
||||
Reference in New Issue
Block a user