summaryrefslogtreecommitdiff
path: root/Objects/frameobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/frameobject.c')
-rw-r--r--Objects/frameobject.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Objects/frameobject.c b/Objects/frameobject.c
index 6337501cfc..9e2f1f4748 100644
--- a/Objects/frameobject.c
+++ b/Objects/frameobject.c
@@ -1329,15 +1329,15 @@ PyFrame_LocalsToFast(PyFrameObject *f, int clear)
}
}
-
-int _PyFrame_IsEntryFrame(PyFrameObject *frame)
+int
+_PyFrame_IsEntryFrame(PyFrameObject *frame)
{
assert(frame != NULL);
- assert(!_PyFrame_IsIncomplete(frame->f_frame));
- return frame->f_frame->is_entry;
+ _PyInterpreterFrame *f = frame->f_frame;
+ assert(!_PyFrame_IsIncomplete(f));
+ return f->previous && f->previous->owner == FRAME_OWNED_BY_CSTACK;
}
-
PyCodeObject *
PyFrame_GetCode(PyFrameObject *frame)
{