summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorPablo Galindo Salgado <Pablogsal@gmail.com>2022-04-13 13:06:56 (GMT)
committerGitHub <noreply@github.com>2022-04-13 13:06:56 (GMT)
commit37a53fb6bd36964d97faad628d16db0b2b62704c (patch)
tree655b0dc3e24f9a7d7d37827473587c462f3919bd /Objects
parent54f67ad54366f1b9161edca283e19670e065e1b8 (diff)
downloadcpython-37a53fb6bd36964d97faad628d16db0b2b62704c.zip
cpython-37a53fb6bd36964d97faad628d16db0b2b62704c.tar.gz
cpython-37a53fb6bd36964d97faad628d16db0b2b62704c.tar.bz2
gh-91502: Add a new API to check if a frame is an entry frame (GH-91503)
Diffstat (limited to 'Objects')
-rw-r--r--Objects/frameobject.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/Objects/frameobject.c b/Objects/frameobject.c
index 7a4d2fa..dc4ef8b 100644
--- a/Objects/frameobject.c
+++ b/Objects/frameobject.c
@@ -1104,6 +1104,14 @@ PyFrame_LocalsToFast(PyFrameObject *f, int clear)
}
}
+
+int _PyFrame_IsEntryFrame(PyFrameObject *frame)
+{
+ assert(frame != NULL);
+ return frame->f_frame->is_entry;
+}
+
+
PyCodeObject *
PyFrame_GetCode(PyFrameObject *frame)
{