Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions Doc/c-api/exceptions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -979,6 +979,27 @@ these are the C equivalent to :func:`reprlib.recursive_repr`.
Ends a :c:func:`Py_ReprEnter`. Must be called once for each
invocation of :c:func:`Py_ReprEnter` that returns zero.

.. c:function:: int Py_GetRecursionLimit(void)

Get the recursion limit for the current interpreter. It can be set with
:c:func:`Py_SetRecursionLimit`. The recursion limit prevents the
Python interpreter stack from growing infinitely.

This function cannot fail, and the caller must hold an
:term:`attached thread state`.

.. seealso::
:py:func:`sys.getrecursionlimit`

.. c:function:: void Py_SetRecursionLimit(int new_limit)

Set the recursion limit for the current interpreter.

This function cannot fail, and the caller must hold an
:term:`attached thread state`.

.. seealso::
:py:func:`sys.setrecursionlimit`

.. _standardexceptions:

Expand Down
Loading