Skip to content

Commit d5c45a8

Browse files
pmendhamdpgeorge
authored andcommitted
embed: Fix arguments to mp_raw_code_load_mem.
Update arguments to mp_raw_code_load_mem so that the embed port can build when MICROPY_PERSISTENT_CODE_LOAD is enabled.
1 parent 416707e commit d5c45a8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ports/embed/port/embed_util.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ void mp_embed_exec_mpy(const uint8_t *mpy, size_t len) {
6666
// Execute the given .mpy data.
6767
mp_module_context_t *ctx = m_new_obj(mp_module_context_t);
6868
ctx->module.globals = mp_globals_get();
69-
mp_compiled_module_t cm = mp_raw_code_load_mem(mpy, len, ctx);
69+
mp_compiled_module_t cm;
70+
cm.context = ctx;
71+
mp_raw_code_load_mem(mpy, len, &cm);
7072
mp_obj_t f = mp_make_function_from_raw_code(cm.rc, ctx, MP_OBJ_NULL);
7173
mp_call_function_0(f);
7274
nlr_pop();

0 commit comments

Comments
 (0)