summaryrefslogtreecommitdiffstatshomepage
path: root/py/runtime.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/runtime.c')
-rw-r--r--py/runtime.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/py/runtime.c b/py/runtime.c
index deb55bf283..bf26921f9a 100644
--- a/py/runtime.c
+++ b/py/runtime.c
@@ -1620,10 +1620,13 @@ mp_obj_t mp_parse_compile_execute(mp_lexer_t *lex, mp_parse_input_kind_t parse_i
mp_obj_t module_fun = mp_compile(&parse_tree, source_name, parse_input_kind == MP_PARSE_SINGLE_INPUT);
mp_obj_t ret;
- if (MICROPY_PY_BUILTINS_COMPILE && globals == NULL) {
+ #if MICROPY_PY_BUILTINS_COMPILE && MICROPY_PY_BUILTINS_CODE == MICROPY_PY_BUILTINS_CODE_MINIMUM
+ if (globals == NULL) {
// for compile only, return value is the module function
ret = module_fun;
- } else {
+ } else
+ #endif
+ {
// execute module function and get return value
ret = mp_call_function_0(module_fun);
}