[3.15] GH-149501: Fix compilation warning in _YIELD_VALUE uop (GH-149502) (#149737)

GH-149501: Fix compilation warning in `_YIELD_VALUE` uop (GH-149502)
(cherry picked from commit 1a79fd0ad6)

Co-authored-by: Sergey Miryanov <sergey.miryanov@gmail.com>
This commit is contained in:
Miss Islington (bot) 2026-05-12 19:58:31 +02:00 committed by GitHub
parent 6a66005699
commit e2e9cea769
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 18 additions and 12 deletions

View file

@ -1867,8 +1867,9 @@ 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 opcode = _Py_GetBaseCodeUnit(_PyFrame_GetCode(frame), i).op.code;
Py_ssize_t i = frame->instr_ptr - _PyFrame_GetBytecode(frame);
assert(i >= 0 && i <= INT_MAX);
int opcode = _Py_GetBaseCodeUnit(_PyFrame_GetCode(frame), (int)i).op.code;
assert(opcode == SEND || opcode == FOR_ITER);
}
#endif