Skip to content

Commit 3453f75

Browse files
committed
gh-148825: Fix build error if specialization is disabled
1 parent d206d42 commit 3453f75

2 files changed

Lines changed: 4 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: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,10 @@ _PyCode_Quicken(_Py_CODEUNIT *instructions, Py_ssize_t size, int enable_counters
112112
}
113113
}
114114
#else
115+
int opcode = 0;
115116
for (Py_ssize_t i = 0; i < size-1; i++) {
116-
if (instructions[i].op.code == GET_ITER) {
117+
opcode = instructions[i].op.code;
118+
if (opcode == GET_ITER) {
117119
fixup_getiter(&instructions[i], flags);
118120
}
119121
i += _PyOpcode_Caches[opcode];

0 commit comments

Comments
 (0)