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 /Python | |
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 'Python')
-rw-r--r-- | Python/pystate.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Python/pystate.c b/Python/pystate.c index 621318f..eea666b 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -1007,6 +1007,14 @@ PyThreadState_GetInterpreter(PyThreadState *tstate) } +struct _frame* +PyThreadState_GetFrame(PyThreadState *tstate) +{ + assert(tstate != NULL); + return _PyThreadState_GetFrame(tstate); +} + + /* Asynchronously raise an exception in a thread. Requested by Just van Rossum and Alex Martelli. To prevent naive misuse, you must write your own extension |