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 @@ -979,6 +979,27 @@ these are the C equivalent to :func:`reprlib.recursive_repr`.
979979 Ends a :c:func: `Py_ReprEnter `. Must be called once for each
980980 invocation of :c:func: `Py_ReprEnter ` that returns zero.
981981
982+ .. c :function :: int Py_GetRecursionLimit (void)
983+
984+ Get the recursion limit for the current interpreter. It can be set with
985+ :c:func:`Py_SetRecursionLimit`. The recursion limit prevents the
986+ Python interpreter stack from growing infinitely.
987+
988+ This function cannot fail, and the caller must hold an
989+ :term:`attached thread state`.
990+
991+ .. seealso::
992+ :py:func:`sys.getrecursionlimit`
993+
994+ .. c:function:: void Py_SetRecursionLimit(int new_limit)
995+
996+ Set the recursion limit for the current interpreter.
997+
998+ This function cannot fail, and the caller must hold an
999+ :term:`attached thread state`.
1000+
1001+ .. seealso::
1002+ :py:func:`sys.setrecursionlimit`
9821003
9831004.. _standardexceptions:
9841005
You can’t perform that action at this time.
0 commit comments