Skip to content

Doc: Py_EnterRecursiveCall uses C stack space, not a call counter #158643

Description

@BHUVANSH855

Documentation

As of 3.14, Py_EnterRecursiveCall and Py_LeaveRecursiveCall no longer use
a call counter (c_recursion_remaining); they compare the current C stack
pointer against tstate->c_stack_soft_limit.

The documentation still describes the check as "if the stack limit is reached"
without clarifying that this is actual C stack consumption, unaffected by
sys.setrecursionlimit(). This was noted by @ZeroIntensity in
#156205 (review)

Linked PRs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions