diff options
author | Victor Stinner <vstinner@python.org> | 2020-03-20 14:51:45 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-20 14:51:45 (GMT) |
commit | fd1e1a18fa3befe5b6eeac32e0561e15c7e5164b (patch) | |
tree | 06a32a688ef6d88553386ec2710eecc5fd246226 /Doc/c-api/init.rst | |
parent | d83168854e19d0381fa57db25fca6c622917624f (diff) | |
download | cpython-fd1e1a18fa3befe5b6eeac32e0561e15c7e5164b.zip cpython-fd1e1a18fa3befe5b6eeac32e0561e15c7e5164b.tar.gz cpython-fd1e1a18fa3befe5b6eeac32e0561e15c7e5164b.tar.bz2 |
bpo-39947: Add PyThreadState_GetFrame() function (GH-19092)
Add PyThreadState_GetFrame() function: get the current frame
of a Python thread state.
Diffstat (limited to 'Doc/c-api/init.rst')
-rw-r--r-- | Doc/c-api/init.rst | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Doc/c-api/init.rst b/Doc/c-api/init.rst index a4ec0e3..294c1b9 100644 --- a/Doc/c-api/init.rst +++ b/Doc/c-api/init.rst @@ -1072,6 +1072,18 @@ All of the following functions must be called after :c:func:`Py_Initialize`. to :c:func:`PyThreadState_Clear`. +.. c:function:: PyFrameObject* PyThreadState_GetFrame(PyThreadState *tstate) + + Get the current frame of the Python thread state *tstate*. It can be + ``NULL`` if no frame is currently executing. + + See also :c:func:`PyEval_GetFrame`. + + *tstate* must not be ``NULL``. + + .. versionadded:: 3.9 + + .. c:function:: PyInterpreterState* PyThreadState_GetInterpreter(PyThreadState *tstate) Get the interpreter of the Python thread state *tstate*. |