diff options
| author | pmendham <peter@brightascension.com> | 2023-03-12 18:29:57 +0000 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2023-03-13 12:35:12 +1100 |
| commit | d5c45a80d250021527c737d194b6debe10ab9dbb (patch) | |
| tree | 5e10ce7246720a9d834fd026da88579416f4d4f5 | |
| parent | 416707eefee7a0dbb4b1604a0633f34725aa0290 (diff) | |
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.
| -rw-r--r-- | ports/embed/port/embed_util.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ports/embed/port/embed_util.c b/ports/embed/port/embed_util.c index a3850f3c0..14f508977 100644 --- a/ports/embed/port/embed_util.c +++ b/ports/embed/port/embed_util.c @@ -66,7 +66,9 @@ void mp_embed_exec_mpy(const uint8_t *mpy, size_t len) { // Execute the given .mpy data. mp_module_context_t *ctx = m_new_obj(mp_module_context_t); ctx->module.globals = mp_globals_get(); - mp_compiled_module_t cm = mp_raw_code_load_mem(mpy, len, ctx); + mp_compiled_module_t cm; + cm.context = ctx; + mp_raw_code_load_mem(mpy, len, &cm); mp_obj_t f = mp_make_function_from_raw_code(cm.rc, ctx, MP_OBJ_NULL); mp_call_function_0(f); nlr_pop(); |
