mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 12:10:13 +01:00
py/runtime: Add helpers to call a general function on nlr jump callback.
Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -197,6 +197,11 @@ void mp_globals_locals_set_from_nlr_jump_callback(void *ctx_in) {
|
||||
mp_locals_set(ctx->locals);
|
||||
}
|
||||
|
||||
void mp_call_function_1_from_nlr_jump_callback(void *ctx_in) {
|
||||
nlr_jump_callback_node_call_function_1_t *ctx = ctx_in;
|
||||
ctx->func(ctx->arg);
|
||||
}
|
||||
|
||||
mp_obj_t MICROPY_WRAP_MP_LOAD_NAME(mp_load_name)(qstr qst) {
|
||||
// logic: search locals, globals, builtins
|
||||
DEBUG_OP_printf("load name %s\n", qstr_str(qst));
|
||||
|
||||
Reference in New Issue
Block a user