https://github.com/python/cpython/commit/78015818c2601db842d101cad6ce2319c921935f commit: 78015818c2601db842d101cad6ce2319c921935f branch: main author: Kirill Podoprigora <[email protected]> committer: Eclips4 <[email protected]> date: 2024-11-05T04:12:31+02:00 summary:
gh-126415: Fix conversion warning in `Python/bytecodes.c` (#126416) Fix conversion warning in bytecodes Co-authored-by: mpage <[email protected]> files: M Python/bytecodes.c M Python/generated_cases.c.h diff --git a/Python/bytecodes.c b/Python/bytecodes.c index 2c78cb9931733d..81b527e8c050b9 100644 --- a/Python/bytecodes.c +++ b/Python/bytecodes.c @@ -197,7 +197,7 @@ dummy_func( _Py_CODEUNIT *bytecode = _PyEval_GetExecutableCode(tstate, _PyFrame_GetCode(frame)); ERROR_IF(bytecode == NULL, error); - int off = this_instr - _PyFrame_GetBytecode(frame); + ptrdiff_t off = this_instr - _PyFrame_GetBytecode(frame); frame->tlbc_index = ((_PyThreadStateImpl *)tstate)->tlbc_index; frame->instr_ptr = bytecode + off; // Make sure this_instr gets reset correctley for any uops that diff --git a/Python/generated_cases.c.h b/Python/generated_cases.c.h index eff246f1997276..c6b8fbc50f388a 100644 --- a/Python/generated_cases.c.h +++ b/Python/generated_cases.c.h @@ -4841,7 +4841,7 @@ stack_pointer = _PyFrame_GetStackPointer(frame); if (bytecode == NULL) goto error; _PyFrame_SetStackPointer(frame, stack_pointer); - int off = this_instr - _PyFrame_GetBytecode(frame); + ptrdiff_t off = this_instr - _PyFrame_GetBytecode(frame); stack_pointer = _PyFrame_GetStackPointer(frame); frame->tlbc_index = ((_PyThreadStateImpl *)tstate)->tlbc_index; frame->instr_ptr = bytecode + off; @@ -6898,7 +6898,7 @@ stack_pointer = _PyFrame_GetStackPointer(frame); if (bytecode == NULL) goto error; _PyFrame_SetStackPointer(frame, stack_pointer); - int off = this_instr - _PyFrame_GetBytecode(frame); + ptrdiff_t off = this_instr - _PyFrame_GetBytecode(frame); stack_pointer = _PyFrame_GetStackPointer(frame); frame->tlbc_index = ((_PyThreadStateImpl *)tstate)->tlbc_index; frame->instr_ptr = bytecode + off; _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-checkins.python.org/ Member address: [email protected]
