From 5b8998da6dfed6c8f54b8b34228f25d93dbb9d29 Mon Sep 17 00:00:00 2001 From: Damien George Date: Mon, 20 Nov 2017 17:29:58 +1100 Subject: py/runtime: Move mp_exc_recursion_depth to runtime and rename to raise. For consistency this helper function is renamed to match the other exception helpers, and moved to their location in runtime.c. --- py/stackctrl.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'py/stackctrl.c') diff --git a/py/stackctrl.c b/py/stackctrl.c index 11165b9a6f..5c07796bde 100644 --- a/py/stackctrl.c +++ b/py/stackctrl.c @@ -48,14 +48,9 @@ void mp_stack_set_limit(mp_uint_t limit) { MP_STATE_THREAD(stack_limit) = limit; } -NORETURN void mp_exc_recursion_depth(void) { - nlr_raise(mp_obj_new_exception_arg1(&mp_type_RuntimeError, - MP_OBJ_NEW_QSTR(MP_QSTR_maximum_space_recursion_space_depth_space_exceeded))); -} - void mp_stack_check(void) { if (mp_stack_usage() >= MP_STATE_THREAD(stack_limit)) { - mp_exc_recursion_depth(); + mp_raise_recursion_depth(); } } -- cgit v1.2.3