https://github.com/python/cpython/commit/eaf4d7311292c67061cae117808e14216ca969df
commit: eaf4d7311292c67061cae117808e14216ca969df
branch: 3.15
author: Miss Islington (bot) <[email protected]>
committer: JelleZijlstra <[email protected]>
date: 2026-06-25T14:36:04Z
summary:

[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 56ae0b8e4f78c612f7b3095cd1c936e54ee0db5f)

Co-authored-by: Marc Mueller <[email protected]>

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 00000000000000..5cf727b5d91fad
--- /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 459e69de5709b8..fb75ca8d58e851 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