mirror of
https://github.com/python/cpython.git
synced 2026-06-27 19:36:07 +00:00
[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:
parent
6a66005699
commit
e2e9cea769
4 changed files with 18 additions and 12 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue