diff options
author | Damien George <damien.p.george@gmail.com> | 2015-05-24 22:36:31 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2015-05-27 15:59:43 +0100 |
commit | 9ae3fc65235303322ef5282d3cdd4ca99a2c37cc (patch) | |
tree | 5644437cc732a8a33f2ec8752610d4d55c8a740b /unix/mpconfigport.h | |
parent | 4a10214be20cb8a51724913903678f4506358752 (diff) |
unix: Add option to use uPy readline, and enable by default.
This gets uPy readline working with unix port, with tab completion and
history. GNU readline is still supported, configure using
MICROPY_USE_READLINE variable.
Diffstat (limited to 'unix/mpconfigport.h')
-rw-r--r-- | unix/mpconfigport.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/unix/mpconfigport.h b/unix/mpconfigport.h index 411817130..2a24061c9 100644 --- a/unix/mpconfigport.h +++ b/unix/mpconfigport.h @@ -184,10 +184,15 @@ extern const struct _mp_obj_fun_builtin_t mp_builtin_open_obj; { MP_OBJ_NEW_QSTR(MP_QSTR_input), (mp_obj_t)&mp_builtin_input_obj }, \ { MP_OBJ_NEW_QSTR(MP_QSTR_open), (mp_obj_t)&mp_builtin_open_obj }, +#define MP_STATE_PORT MP_STATE_VM + #define MICROPY_PORT_ROOT_POINTERS \ + const char *readline_hist[50]; \ mp_obj_t keyboard_interrupt_obj; \ void *mmap_region_head; \ +#define MICROPY_HAL_H "unix_mphal.h" + // We need to provide a declaration/definition of alloca() #ifdef __FreeBSD__ #include <stdlib.h> |