Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4ff833e commit 04b77acCopy full SHA for 04b77ac
1 file changed
Include/internal/pycore_frame.h
@@ -153,6 +153,21 @@ _PyFrame_IsIncomplete(_PyInterpreterFrame *frame)
153
frame->prev_instr < _PyCode_CODE(frame->f_code) + frame->f_code->_co_firsttraceable;
154
}
155
156
+static inline _PyInterpreterFrame *
157
+_PyFrame_GetComplete(_PyInterpreterFrame *frame)
158
+{
159
+ while (frame && _PyFrame_IsIncomplete(frame)) {
160
+ frame = frame->previous;
161
+ }
162
+ return frame;
163
+}
164
+
165
166
+_PyThreadState_GetFrame(PyThreadState *tstate)
167
168
+ return _PyFrame_GetComplete(tstate->cframe->current_frame);
169
170
171
/* For use by _PyFrame_GetFrameObject
172
Do not call directly. */
173
PyFrameObject *
0 commit comments