From 87bc8e2b3d66d3e87c2d01a7b3107a8ecce2a07f Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Thu, 15 Jan 2015 10:46:27 +0200 Subject: pyexec: Add event-driven variant pyexec_friendly_repl(). pyexec_friendly_repl_process_char() and friends, useful for ports which integrate into existing cooperative multitasking system. Unlike readline() refactor before, this was implemented in less formal, trial&error process, minor functionality regressions are still known (like soft&hard reset support). So, original loop-based pyexec_friendly_repl() is left intact, specific implementation selectable by config setting. --- py/mpconfig.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'py') diff --git a/py/mpconfig.h b/py/mpconfig.h index 5718ffacb..eb39d54c4 100644 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -235,6 +235,11 @@ #define MICROPY_HELPER_REPL (0) #endif +// Whether port requires event-driven REPL functions +#ifndef MICROPY_REPL_EVENT_DRIVEN +#define MICROPY_REPL_EVENT_DRIVEN (0) +#endif + // Whether to include lexer helper function for unix #ifndef MICROPY_HELPER_LEXER_UNIX #define MICROPY_HELPER_LEXER_UNIX (0) -- cgit v1.2.3