Skip to content

Commit

Permalink
py/builtinimport: Remove duplicate static function argument.
Browse files Browse the repository at this point in the history
context==mc in all cases where this function was being called.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
  • Loading branch information
projectgus committed Jul 27, 2022
1 parent f9cbe6b commit 1230d86
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions py/builtinimport.c
Expand Up @@ -159,7 +159,7 @@ STATIC void do_load_from_lexer(mp_module_context_t *context, mp_lexer_t *lex) {
#endif

#if (MICROPY_HAS_FILE_READER && MICROPY_PERSISTENT_CODE_LOAD) || MICROPY_MODULE_FROZEN_MPY
STATIC void do_execute_raw_code(mp_module_context_t *context, const mp_raw_code_t *rc, const mp_module_context_t *mc, const char *source_name) {
STATIC void do_execute_raw_code(const mp_module_context_t *context, const mp_raw_code_t *rc, const char *source_name) {
(void)source_name;

#if MICROPY_PY___FILE__
Expand All @@ -179,7 +179,7 @@ STATIC void do_execute_raw_code(mp_module_context_t *context, const mp_raw_code_

nlr_buf_t nlr;
if (nlr_push(&nlr) == 0) {
mp_obj_t module_fun = mp_make_function_from_raw_code(rc, mc, NULL);
mp_obj_t module_fun = mp_make_function_from_raw_code(rc, context, NULL);
mp_call_function_0(module_fun);

// finish nlr block, restore context
Expand Down Expand Up @@ -224,7 +224,7 @@ STATIC void do_load(mp_module_context_t *module_obj, vstr_t *file) {
if (frozen_type == MP_FROZEN_MPY) {
const mp_frozen_module_t *frozen = modref;
module_obj->constants = frozen->constants;
do_execute_raw_code(module_obj, frozen->rc, module_obj, file_str + frozen_path_prefix_len);
do_execute_raw_code(module_obj, frozen->rc, file_str + frozen_path_prefix_len);
return;
}
#endif
Expand All @@ -237,7 +237,7 @@ STATIC void do_load(mp_module_context_t *module_obj, vstr_t *file) {
#if MICROPY_HAS_FILE_READER && MICROPY_PERSISTENT_CODE_LOAD
if (file_str[file->len - 3] == 'm') {
mp_compiled_module_t cm = mp_raw_code_load_file(file_str, module_obj);
do_execute_raw_code(module_obj, cm.rc, cm.context, file_str);
do_execute_raw_code(cm.context, cm.rc, file_str);
return;
}
#endif
Expand Down

0 comments on commit 1230d86

Please sign in to comment.