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 /py | |
| 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 'py')
| -rw-r--r-- | py/mpconfig.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h index d70d39ae9..adaa3ec1f 100644 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -699,6 +699,11 @@ #define MICROPY_REPL_EVENT_DRIVEN (0) #endif +// The number of items to keep in the readline history. +#ifndef MICROPY_READLINE_HISTORY_SIZE +#define MICROPY_READLINE_HISTORY_SIZE (8) +#endif + // Whether to include lexer helper function for unix #ifndef MICROPY_HELPER_LEXER_UNIX #define MICROPY_HELPER_LEXER_UNIX (0) |
