diff options
Diffstat (limited to 'Python/frame.c')
-rw-r--r-- | Python/frame.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Python/frame.c b/Python/frame.c index b1525cc..6a287d4 100644 --- a/Python/frame.c +++ b/Python/frame.c @@ -96,10 +96,7 @@ take_ownership(PyFrameObject *f, _PyInterpreterFrame *frame) } assert(!_PyFrame_IsIncomplete(frame)); assert(f->f_back == NULL); - _PyInterpreterFrame *prev = frame->previous; - while (prev && _PyFrame_IsIncomplete(prev)) { - prev = prev->previous; - } + _PyInterpreterFrame *prev = _PyFrame_GetFirstComplete(frame->previous); frame->previous = NULL; if (prev) { assert(prev->owner != FRAME_OWNED_BY_CSTACK); |