summaryrefslogtreecommitdiff
path: root/shared/runtime/pyexec.c
diff options
context:
space:
mode:
Diffstat (limited to 'shared/runtime/pyexec.c')
-rw-r--r--shared/runtime/pyexec.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/shared/runtime/pyexec.c b/shared/runtime/pyexec.c
index 9dc4446ed..c828c7581 100644
--- a/shared/runtime/pyexec.c
+++ b/shared/runtime/pyexec.c
@@ -720,6 +720,11 @@ int pyexec_frozen_module(const char *name, bool allow_keyboard_interrupt) {
}
#endif
+int pyexec_vstr(vstr_t *str, bool allow_keyboard_interrupt) {
+ mp_uint_t exec_flags = allow_keyboard_interrupt ? 0 : EXEC_FLAG_NO_INTERRUPT;
+ return parse_compile_execute(str, MP_PARSE_FILE_INPUT, exec_flags | EXEC_FLAG_SOURCE_IS_VSTR);
+}
+
#if MICROPY_REPL_INFO
mp_obj_t pyb_set_repl_info(mp_obj_t o_value) {
repl_display_debugging_info = mp_obj_get_int(o_value);