From fd1e1a18fa3befe5b6eeac32e0561e15c7e5164b Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 20 Mar 2020 15:51:45 +0100 Subject: bpo-39947: Add PyThreadState_GetFrame() function (GH-19092) Add PyThreadState_GetFrame() function: get the current frame of a Python thread state. --- Python/pystate.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Python/pystate.c') diff --git a/Python/pystate.c b/Python/pystate.c index 621318f4b5..eea666b7e5 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 -- cgit v1.2.1