Skip to content

Commit 2062e11

Browse files
authored
gh-106267: Add type cast to generated code (#106289)
1 parent 02ce3d5 commit 2062e11

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Python/executor_cases.c.h

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Tools/cases_generator/generate_cases.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ def write_body(
520520
f"{typ}{ceffect.name} = {func}(&next_instr[{active.offset}].cache);"
521521
)
522522
else:
523-
out.emit(f"{typ}{ceffect.name} = operand;")
523+
out.emit(f"{typ}{ceffect.name} = ({typ.strip()})operand;")
524524

525525
# Write the body, substituting a goto for ERROR_IF() and other stuff
526526
assert dedent <= 0

0 commit comments

Comments
 (0)