https://github.com/python/cpython/commit/56ae0b8e4f78c612f7b3095cd1c936e54ee0db5f
commit: 56ae0b8e4f78c612f7b3095cd1c936e54ee0db5f
branch: main
author: Marc Mueller <[email protected]>
committer: JelleZijlstra <[email protected]>
date: 2026-06-25T14:06:22Z
summary:

gh-148825: Fix build error if specialization is disabled (#148826)

files:
A 
Misc/NEWS.d/next/Core_and_Builtins/2026-04-21-15-07-03.gh-issue-148825.AbJzmZ.rst
M Python/specialize.c

diff --git 
a/Misc/NEWS.d/next/Core_and_Builtins/2026-04-21-15-07-03.gh-issue-148825.AbJzmZ.rst
 
b/Misc/NEWS.d/next/Core_and_Builtins/2026-04-21-15-07-03.gh-issue-148825.AbJzmZ.rst
new file mode 100644
index 000000000000000..5cf727b5d91fad1
--- /dev/null
+++ 
b/Misc/NEWS.d/next/Core_and_Builtins/2026-04-21-15-07-03.gh-issue-148825.AbJzmZ.rst
@@ -0,0 +1 @@
+Fix build error if specialization is disabled.
diff --git a/Python/specialize.c b/Python/specialize.c
index 04aeb4a76d4046a..eca0c4ac2177699 100644
--- a/Python/specialize.c
+++ b/Python/specialize.c
@@ -113,7 +113,8 @@ _PyCode_Quicken(_Py_CODEUNIT *instructions, Py_ssize_t 
size, int enable_counters
     }
     #else
     for (Py_ssize_t i = 0; i < size-1; i++) {
-        if (instructions[i].op.code == GET_ITER) {
+        int opcode = instructions[i].op.code;
+        if (opcode == GET_ITER) {
             fixup_getiter(&instructions[i], flags);
         }
         i += _PyOpcode_Caches[opcode];

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to