This commit is contained in:
Sahil Jain
2025-07-01 22:52:59 +05:30
parent 97ec04789d
commit 6e0089e01c

View File

@@ -897,8 +897,10 @@ PycRef<ASTNode> BuildFromCode(PycRef<PycCode> code, PycModule* mod)
case Pyc::INSTRUMENTED_FOR_ITER_A: case Pyc::INSTRUMENTED_FOR_ITER_A:
{ {
PycRef<ASTNode> iter = stack.top(); // Iterable PycRef<ASTNode> iter = stack.top(); // Iterable
if (mod->verCompare(3,12) < 0) if (mod->verCompare(3, 12) < 0) {
// Do not pop the iterator for py 3.12+
stack.pop(); stack.pop();
}
/* Pop it? Don't pop it? */ /* Pop it? Don't pop it? */
int end; int end;
@@ -1705,7 +1707,6 @@ PycRef<ASTNode> BuildFromCode(PycRef<PycCode> code, PycModule* mod)
} }
else { else {
fprintf(stderr, "Wrong block type %i for END_FOR\n", curblock->blktype()); fprintf(stderr, "Wrong block type %i for END_FOR\n", curblock->blktype());
break;
} }
} }
break; break;