]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.15] gh-148825: Fix build error if specialization is disabled (GH-148826) (#152206)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 25 Jun 2026 14:36:04 +0000 (16:36 +0200)
committerGitHub <noreply@github.com>
Thu, 25 Jun 2026 14:36:04 +0000 (14:36 +0000)
gh-148825: Fix build error if specialization is disabled (GH-148826)
(cherry picked from commit 56ae0b8e4f78c612f7b3095cd1c936e54ee0db5f)

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Misc/NEWS.d/next/Core_and_Builtins/2026-04-21-15-07-03.gh-issue-148825.AbJzmZ.rst [new file with mode: 0644]
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 (file)
index 0000000..5cf727b
--- /dev/null
@@ -0,0 +1 @@
+Fix build error if specialization is disabled.
index 459e69de5709b8a8b408724b892b6657cc3efe6f..fb75ca8d58e8511dccb0950eff4685202b6f96ea 100644 (file)
@@ -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];