Skip to content

Commit

Permalink
py/builtinimport: Fix condition for including do_execute_raw_code().
Browse files Browse the repository at this point in the history
Commit e33bc59 ("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 <david@pybricks.com>
  • Loading branch information
dlech authored and dpgeorge committed Jul 31, 2021
1 parent 4445c73 commit afcc77c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion py/builtinimport.c
Expand Up @@ -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;

Expand Down

0 comments on commit afcc77c

Please sign in to comment.