mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-23 15:50:49 +01:00
[python] Update to MicroPython 1.9.4
This commit is contained in:
committed by
EmilieNumworks
parent
caff93cda0
commit
73250e727a
@@ -27,22 +27,26 @@
|
||||
|
||||
#include "py/runtime.h"
|
||||
|
||||
void mp_call_function_1_protected(mp_obj_t fun, mp_obj_t arg) {
|
||||
mp_obj_t mp_call_function_1_protected(mp_obj_t fun, mp_obj_t arg) {
|
||||
nlr_buf_t nlr;
|
||||
if (nlr_push(&nlr) == 0) {
|
||||
mp_call_function_1(fun, arg);
|
||||
mp_obj_t ret = mp_call_function_1(fun, arg);
|
||||
nlr_pop();
|
||||
return ret;
|
||||
} else {
|
||||
mp_obj_print_exception(&mp_plat_print, MP_OBJ_FROM_PTR(nlr.ret_val));
|
||||
return MP_OBJ_NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void mp_call_function_2_protected(mp_obj_t fun, mp_obj_t arg1, mp_obj_t arg2) {
|
||||
mp_obj_t mp_call_function_2_protected(mp_obj_t fun, mp_obj_t arg1, mp_obj_t arg2) {
|
||||
nlr_buf_t nlr;
|
||||
if (nlr_push(&nlr) == 0) {
|
||||
mp_call_function_2(fun, arg1, arg2);
|
||||
mp_obj_t ret = mp_call_function_2(fun, arg1, arg2);
|
||||
nlr_pop();
|
||||
return ret;
|
||||
} else {
|
||||
mp_obj_print_exception(&mp_plat_print, MP_OBJ_FROM_PTR(nlr.ret_val));
|
||||
return MP_OBJ_NULL;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user