Skip to content

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

Merged
JelleZijlstra merged 3 commits into
python:mainfrom
cdce8p:fix-missing-opcode
Jun 25, 2026
Merged

gh-148825: Fix build error if specialization is disabled#148826
JelleZijlstra merged 3 commits into
python:mainfrom
cdce8p:fix-missing-opcode

Conversation

@cdce8p

@cdce8p cdce8p commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

Comment thread Python/specialize.c Outdated
int opcode = 0;
for (Py_ssize_t i = 0; i < size-1; i++) {
if (instructions[i].op.code == GET_ITER) {
opcode = instructions[i].op.code;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just declare the variable here?

@JelleZijlstra JelleZijlstra added the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jun 25, 2026
@JelleZijlstra JelleZijlstra enabled auto-merge (squash) June 25, 2026 14:06
@JelleZijlstra JelleZijlstra merged commit 56ae0b8 into python:main Jun 25, 2026
58 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @cdce8p for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Jun 25, 2026

Copy link
Copy Markdown

GH-152206 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jun 25, 2026
@cdce8p cdce8p deleted the fix-missing-opcode branch June 25, 2026 14:32
JelleZijlstra pushed a commit that referenced this pull request Jun 25, 2026
…48826) (#152206)

gh-148825: Fix build error if specialization is disabled (GH-148826)
(cherry picked from commit 56ae0b8)

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants