From afcc77cebc38020d838e0af5ef4c9b7d3028a6c3 Mon Sep 17 00:00:00 2001 From: David Lechner Date: Fri, 30 Jul 2021 10:26:17 -0500 Subject: [PATCH] py/builtinimport: Fix condition for including do_execute_raw_code(). Commit e33bc597 ("py: Remove calls to file reader functions when these are disabled.") changed the condition for one caller of do_execute_raw_code() from MICROPY_PERSISTENT_CODE_LOAD to MICROPY_HAS_FILE_READER && MICROPY_PERSISTENT_CODE_LOAD The condition that enables compiling the function itself needs to be changed to match. Signed-off-by: David Lechner --- py/builtinimport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py/builtinimport.c b/py/builtinimport.c index abbeefced5..cdee5e4070 100644 --- a/py/builtinimport.c +++ b/py/builtinimport.c @@ -142,7 +142,7 @@ STATIC void do_load_from_lexer(mp_obj_t module_obj, mp_lexer_t *lex) { } #endif -#if MICROPY_PERSISTENT_CODE_LOAD || MICROPY_MODULE_FROZEN_MPY +#if (MICROPY_HAS_FILE_READER && MICROPY_PERSISTENT_CODE_LOAD) || MICROPY_MODULE_FROZEN_MPY STATIC void do_execute_raw_code(mp_obj_t module_obj, mp_raw_code_t *raw_code, const char *source_name) { (void)source_name;