diff options
Diffstat (limited to 'py/runtime.h')
-rw-r--r-- | py/runtime.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/py/runtime.h b/py/runtime.h index 5465c06d8a..e8e5a758f8 100644 --- a/py/runtime.h +++ b/py/runtime.h @@ -28,7 +28,7 @@ #include "py/mpstate.h" #include "py/pystack.h" -#include "py/stackctrl.h" +#include "py/cstack.h" // For use with mp_call_function_1_from_nlr_jump_callback. #define MP_DEFINE_NLR_JUMP_CALLBACK_FUNCTION_1(ctx, f, a) \ @@ -159,8 +159,7 @@ void mp_call_function_1_from_nlr_jump_callback(void *ctx_in); static inline void mp_thread_init_state(mp_state_thread_t *ts, size_t stack_size, mp_obj_dict_t *locals, mp_obj_dict_t *globals) { mp_thread_set_state(ts); - mp_stack_set_top(ts + 1); // need to include ts in root-pointer scan - mp_stack_set_limit(stack_size); + mp_cstack_init_with_top(ts + 1, stack_size); // need to include ts in root-pointer scan // GC starts off unlocked ts->gc_lock_depth = 0; |