From 524a701d0742d2ae469771a065c62e41656a5dc7 Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Fri, 27 Oct 2023 14:37:59 +0300 Subject: gh-111386: Fix `uint32_t` cast in `generated_cases.c.h` (#111387) --- Python/bytecodes.c | 2 +- Python/generated_cases.c.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Python/bytecodes.c b/Python/bytecodes.c index 2d7b5ba..5b1d70b 100644 --- a/Python/bytecodes.c +++ b/Python/bytecodes.c @@ -2686,7 +2686,7 @@ dummy_func( assert(next_instr[oparg].op.code == END_FOR || next_instr[oparg].op.code == INSTRUMENTED_END_FOR); assert(1 + INLINE_CACHE_ENTRIES_FOR_ITER == next_instr - frame->instr_ptr); - frame->return_offset = 1 + INLINE_CACHE_ENTRIES_FOR_ITER + oparg; + frame->return_offset = (uint16_t)(1 + INLINE_CACHE_ENTRIES_FOR_ITER + oparg); DISPATCH_INLINED(gen_frame); } diff --git a/Python/generated_cases.c.h b/Python/generated_cases.c.h index d5e0d84..fb4506e 100644 --- a/Python/generated_cases.c.h +++ b/Python/generated_cases.c.h @@ -3440,7 +3440,7 @@ assert(next_instr[oparg].op.code == END_FOR || next_instr[oparg].op.code == INSTRUMENTED_END_FOR); assert(1 + INLINE_CACHE_ENTRIES_FOR_ITER == next_instr - frame->instr_ptr); - frame->return_offset = 1 + INLINE_CACHE_ENTRIES_FOR_ITER + oparg; + frame->return_offset = (uint16_t)(1 + INLINE_CACHE_ENTRIES_FOR_ITER + oparg); DISPATCH_INLINED(gen_frame); } -- cgit v0.12