summaryrefslogtreecommitdiff
path: root/py/repl.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/repl.c')
-rw-r--r--py/repl.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/py/repl.c b/py/repl.c
index 822e385ab..4e47cf784 100644
--- a/py/repl.c
+++ b/py/repl.c
@@ -33,6 +33,16 @@
#if MICROPY_HELPER_REPL
+#if MICROPY_PY_SYS_PS1_PS2
+const char *mp_repl_get_psx(unsigned int entry) {
+ if (mp_obj_is_str(MP_STATE_VM(sys_mutable)[entry])) {
+ return mp_obj_str_get_str(MP_STATE_VM(sys_mutable)[entry]);
+ } else {
+ return "";
+ }
+}
+#endif
+
STATIC bool str_startswith_word(const char *str, const char *head) {
size_t i;
for (i = 0; str[i] && head[i]; i++) {