diff options
| author | David Lechner <david@pybricks.com> | 2022-07-01 14:06:10 -0500 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2022-07-18 13:48:49 +1000 |
| commit | 81dbea1ce3c27a609a9b27caadd12cceef86a907 (patch) | |
| tree | f870095ea5709fdb102ec9d58fcd7dd32275b2e2 /ports/unix | |
| parent | fc3d7ae11be11a7f05709ebfd439061fce9ee555 (diff) | |
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>
Diffstat (limited to 'ports/unix')
| -rw-r--r-- | ports/unix/mpconfigport.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ports/unix/mpconfigport.h b/ports/unix/mpconfigport.h index 232bfb857..4594b8be9 100644 --- a/ports/unix/mpconfigport.h +++ b/ports/unix/mpconfigport.h @@ -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 \ |
