]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-148825: Fix build error if specialization is disabled (#148826)
authorMarc Mueller <30130371+cdce8p@users.noreply.github.com>
Thu, 25 Jun 2026 14:06:22 +0000 (16:06 +0200)
committerGitHub <noreply@github.com>
Thu, 25 Jun 2026 14:06:22 +0000 (14:06 +0000)
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 04aeb4a76d4046a6d846bf797978c7999a1e112e..eca0c4ac2177699f40915030a07c4027936cd90f 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];