From 0cb3e7dea882d434a10bab82b3f72b50a0cc63a4 Mon Sep 17 00:00:00 2001 From: Sergey Miryanov Date: Thu, 7 May 2026 21:45:38 +0500 Subject: [PATCH] Fix warning for _YIELD_VALUE --- Modules/_testinternalcapi/test_cases.c.h | 4 ++-- Python/bytecodes.c | 2 +- Python/executor_cases.c.h | 2 +- Python/generated_cases.c.h | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Modules/_testinternalcapi/test_cases.c.h b/Modules/_testinternalcapi/test_cases.c.h index 238e17bea303d3..894c4d16e11bdd 100644 --- a/Modules/_testinternalcapi/test_cases.c.h +++ b/Modules/_testinternalcapi/test_cases.c.h @@ -7946,7 +7946,7 @@ assert(INLINE_CACHE_ENTRIES_SEND == INLINE_CACHE_ENTRIES_FOR_ITER); #if TIER_ONE && defined(Py_DEBUG) if (!PyStackRef_IsNone(frame->f_executable)) { - int i = frame->instr_ptr - _PyFrame_GetBytecode(frame); + int i = (int)(frame->instr_ptr - _PyFrame_GetBytecode(frame)); int opcode = _Py_GetBaseCodeUnit(_PyFrame_GetCode(frame), i).op.code; assert(opcode == SEND || opcode == FOR_ITER); } @@ -13056,7 +13056,7 @@ assert(INLINE_CACHE_ENTRIES_SEND == INLINE_CACHE_ENTRIES_FOR_ITER); #if TIER_ONE && defined(Py_DEBUG) if (!PyStackRef_IsNone(frame->f_executable)) { - int i = frame->instr_ptr - _PyFrame_GetBytecode(frame); + int i = (int)(frame->instr_ptr - _PyFrame_GetBytecode(frame)); int opcode = _Py_GetBaseCodeUnit(_PyFrame_GetCode(frame), i).op.code; assert(opcode == SEND || opcode == FOR_ITER); } diff --git a/Python/bytecodes.c b/Python/bytecodes.c index 3bd489122da9d4..cf34db74a158cf 100644 --- a/Python/bytecodes.c +++ b/Python/bytecodes.c @@ -1867,7 +1867,7 @@ dummy_func( assert(INLINE_CACHE_ENTRIES_SEND == INLINE_CACHE_ENTRIES_FOR_ITER); #if TIER_ONE && defined(Py_DEBUG) if (!PyStackRef_IsNone(frame->f_executable)) { - int i = frame->instr_ptr - _PyFrame_GetBytecode(frame); + int i = (int)(frame->instr_ptr - _PyFrame_GetBytecode(frame)); int opcode = _Py_GetBaseCodeUnit(_PyFrame_GetCode(frame), i).op.code; assert(opcode == SEND || opcode == FOR_ITER); } diff --git a/Python/executor_cases.c.h b/Python/executor_cases.c.h index b6a2821db3007e..4edbc999ef32bf 100644 --- a/Python/executor_cases.c.h +++ b/Python/executor_cases.c.h @@ -9346,7 +9346,7 @@ assert(INLINE_CACHE_ENTRIES_SEND == INLINE_CACHE_ENTRIES_FOR_ITER); #if TIER_ONE && defined(Py_DEBUG) if (!PyStackRef_IsNone(frame->f_executable)) { - int i = frame->instr_ptr - _PyFrame_GetBytecode(frame); + int i = (int)(frame->instr_ptr - _PyFrame_GetBytecode(frame)); int opcode = _Py_GetBaseCodeUnit(_PyFrame_GetCode(frame), i).op.code; assert(opcode == SEND || opcode == FOR_ITER); } diff --git a/Python/generated_cases.c.h b/Python/generated_cases.c.h index 2623105656c90c..900b6179286db6 100644 --- a/Python/generated_cases.c.h +++ b/Python/generated_cases.c.h @@ -7945,7 +7945,7 @@ assert(INLINE_CACHE_ENTRIES_SEND == INLINE_CACHE_ENTRIES_FOR_ITER); #if TIER_ONE && defined(Py_DEBUG) if (!PyStackRef_IsNone(frame->f_executable)) { - int i = frame->instr_ptr - _PyFrame_GetBytecode(frame); + int i = (int)(frame->instr_ptr - _PyFrame_GetBytecode(frame)); int opcode = _Py_GetBaseCodeUnit(_PyFrame_GetCode(frame), i).op.code; assert(opcode == SEND || opcode == FOR_ITER); } @@ -13053,7 +13053,7 @@ assert(INLINE_CACHE_ENTRIES_SEND == INLINE_CACHE_ENTRIES_FOR_ITER); #if TIER_ONE && defined(Py_DEBUG) if (!PyStackRef_IsNone(frame->f_executable)) { - int i = frame->instr_ptr - _PyFrame_GetBytecode(frame); + int i = (int)(frame->instr_ptr - _PyFrame_GetBytecode(frame)); int opcode = _Py_GetBaseCodeUnit(_PyFrame_GetCode(frame), i).op.code; assert(opcode == SEND || opcode == FOR_ITER); }