summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-12-01 14:13:15 (GMT)
committerGitHub <noreply@github.com>2023-12-01 14:13:15 (GMT)
commit7eff607debb6e749a0066ec7fd20be2616c17da3 (patch)
treeca5dcf4bdf458e5fad47703d1d599f38c7d11baf /Include
parentedce0c4fb3e5f9fb26b2c214e3479ffa13dbaa43 (diff)
downloadcpython-7eff607debb6e749a0066ec7fd20be2616c17da3.zip
cpython-7eff607debb6e749a0066ec7fd20be2616c17da3.tar.gz
cpython-7eff607debb6e749a0066ec7fd20be2616c17da3.tar.bz2
[3.12] gh-111058: Change coro.cr_frame/gen.gi_frame to be None for a closed coroutine/generator. (GH-112428) (#112589)
Diffstat (limited to 'Include')
-rw-r--r--Include/internal/pycore_frame.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Include/internal/pycore_frame.h b/Include/internal/pycore_frame.h
index 158db2c..bfe4a75 100644
--- a/Include/internal/pycore_frame.h
+++ b/Include/internal/pycore_frame.h
@@ -39,6 +39,8 @@ typedef enum _framestate {
FRAME_CLEARED = 4
} PyFrameState;
+#define FRAME_STATE_FINISHED(S) ((S) >= FRAME_COMPLETED)
+
enum _frameowner {
FRAME_OWNED_BY_THREAD = 0,
FRAME_OWNED_BY_GENERATOR = 1,