Skip to content

Commit eaf4d73

Browse files
[3.15] gh-148825: Fix build error if specialization is disabled (GH-148826) (#152206)
gh-148825: Fix build error if specialization is disabled (GH-148826) (cherry picked from commit 56ae0b8) Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
1 parent 0222238 commit eaf4d73

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix build error if specialization is disabled.

Python/specialize.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ _PyCode_Quicken(_Py_CODEUNIT *instructions, Py_ssize_t size, int enable_counters
113113
}
114114
#else
115115
for (Py_ssize_t i = 0; i < size-1; i++) {
116-
if (instructions[i].op.code == GET_ITER) {
116+
int opcode = instructions[i].op.code;
117+
if (opcode == GET_ITER) {
117118
fixup_getiter(&instructions[i], flags);
118119
}
119120
i += _PyOpcode_Caches[opcode];

0 commit comments

Comments
 (0)