diff options
author | Mark Shannon <mark@hotpy.org> | 2022-10-05 00:34:03 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-05 00:34:03 (GMT) |
commit | 76449350b3467b85bcb565f9e2bf945bd150a66e (patch) | |
tree | e4237841cdb9d9984e3249823a8518c79470d73f /Python/pystate.c | |
parent | 0ff8fd65838f9f9ed90d7a055d26a2ce9fc0ce85 (diff) | |
download | cpython-76449350b3467b85bcb565f9e2bf945bd150a66e.zip cpython-76449350b3467b85bcb565f9e2bf945bd150a66e.tar.gz cpython-76449350b3467b85bcb565f9e2bf945bd150a66e.tar.bz2 |
GH-91079: Decouple C stack overflow checks from Python recursion checks. (GH-96510)
Diffstat (limited to 'Python/pystate.c')
-rw-r--r-- | Python/pystate.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Python/pystate.c b/Python/pystate.c index 23e9d24..50ae0ce 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -792,8 +792,9 @@ init_threadstate(PyThreadState *tstate, tstate->native_thread_id = PyThread_get_thread_native_id(); #endif - tstate->recursion_limit = interp->ceval.recursion_limit, - tstate->recursion_remaining = interp->ceval.recursion_limit, + tstate->py_recursion_limit = interp->ceval.recursion_limit, + tstate->py_recursion_remaining = interp->ceval.recursion_limit, + tstate->c_recursion_remaining = C_RECURSION_LIMIT; tstate->exc_info = &tstate->exc_state; |