py/emitnative: Add support for using setjmp with native emitter.
To enable this feature the N_NLR_SETJMP macro should be set to 1 before including py/emitnative.c.
This commit is contained in:
@@ -244,7 +244,11 @@ const void *const mp_fun_table[MP_F_NUMBER_OF] = {
|
||||
mp_call_method_n_kw_var,
|
||||
mp_native_getiter,
|
||||
mp_native_iternext,
|
||||
#if MICROPY_NLR_SETJMP
|
||||
nlr_push_tail,
|
||||
#else
|
||||
nlr_push,
|
||||
#endif
|
||||
nlr_pop,
|
||||
mp_native_raise,
|
||||
mp_import_name,
|
||||
@@ -262,6 +266,11 @@ const void *const mp_fun_table[MP_F_NUMBER_OF] = {
|
||||
mp_small_int_floor_divide,
|
||||
mp_small_int_modulo,
|
||||
mp_native_yield_from,
|
||||
#if MICROPY_NLR_SETJMP
|
||||
setjmp,
|
||||
#else
|
||||
NULL,
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif // MICROPY_EMIT_NATIVE
|
||||
|
||||
Reference in New Issue
Block a user