File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -967,6 +967,27 @@ these are the C equivalent to :func:`reprlib.recursive_repr`.
967967 Ends a :c:func: `Py_ReprEnter `. Must be called once for each
968968 invocation of :c:func: `Py_ReprEnter ` that returns zero.
969969
970+ .. c :function :: int Py_GetRecursionLimit (void)
971+
972+ Get the recursion limit for the current interpreter. It can be set with
973+ :c:func:`Py_SetRecursionLimit`. The recursion limit prevents the
974+ Python interpreter stack from growing infinitely.
975+
976+ This function cannot fail, and the caller must hold the
977+ :term:`GIL`.
978+
979+ .. seealso::
980+ :py:func:`sys.getrecursionlimit`
981+
982+ .. c:function:: void Py_SetRecursionLimit(int new_limit)
983+
984+ Set the recursion limit for the current interpreter.
985+
986+ This function cannot fail, and the caller must hold the
987+ :term:`GIL`.
988+
989+ .. seealso::
990+ :py:func:`sys.setrecursionlimit`
970991
971992.. _standardexceptions:
972993
You can’t perform that action at this time.
0 commit comments