summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-05-23 18:58:53 (GMT)
committerGitHub <noreply@github.com>2022-05-23 18:58:53 (GMT)
commitf0950585a3723fd674964733ae3ced9217cf9d21 (patch)
tree75588e66e0d9a94b48363e7d50c38ae6cfa3cb0d /Python
parent96218f774e2b3c5a4ded5f48b22ec97e02043def (diff)
downloadcpython-f0950585a3723fd674964733ae3ced9217cf9d21.zip
cpython-f0950585a3723fd674964733ae3ced9217cf9d21.tar.gz
cpython-f0950585a3723fd674964733ae3ced9217cf9d21.tar.bz2
gh-93061: Mark as artificial: backwards jump after async for (GH-93062) (GH-93110)
(cherry picked from commit a458be3263b4cb92f3fde726461e8ef44b2a4a9d) Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
Diffstat (limited to 'Python')
-rw-r--r--Python/compile.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 45944ae..cc0d76e 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -3152,6 +3152,8 @@ compiler_async_for(struct compiler *c, stmt_ty s)
/* Success block for __anext__ */
VISIT(c, expr, s->v.AsyncFor.target);
VISIT_SEQ(c, stmt, s->v.AsyncFor.body);
+ /* Mark jump as artificial */
+ UNSET_LOC(c);
ADDOP_JUMP(c, JUMP, start);
compiler_pop_fblock(c, FOR_LOOP, start);