mirror of
https://github.com/python/cpython.git
synced 2025-12-04 08:34:25 +00:00
gh-126415: Fix conversion warning in Python/bytecodes.c (#126416)
Fix conversion warning in bytecodes Co-authored-by: mpage <mpage@cs.stanford.edu>
This commit is contained in:
parent
532fc08102
commit
78015818c2
2 changed files with 3 additions and 3 deletions
|
|
@ -197,7 +197,7 @@ dummy_func(
|
||||||
_Py_CODEUNIT *bytecode =
|
_Py_CODEUNIT *bytecode =
|
||||||
_PyEval_GetExecutableCode(tstate, _PyFrame_GetCode(frame));
|
_PyEval_GetExecutableCode(tstate, _PyFrame_GetCode(frame));
|
||||||
ERROR_IF(bytecode == NULL, error);
|
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->tlbc_index = ((_PyThreadStateImpl *)tstate)->tlbc_index;
|
||||||
frame->instr_ptr = bytecode + off;
|
frame->instr_ptr = bytecode + off;
|
||||||
// Make sure this_instr gets reset correctley for any uops that
|
// Make sure this_instr gets reset correctley for any uops that
|
||||||
|
|
|
||||||
4
Python/generated_cases.c.h
generated
4
Python/generated_cases.c.h
generated
|
|
@ -4841,7 +4841,7 @@
|
||||||
stack_pointer = _PyFrame_GetStackPointer(frame);
|
stack_pointer = _PyFrame_GetStackPointer(frame);
|
||||||
if (bytecode == NULL) goto error;
|
if (bytecode == NULL) goto error;
|
||||||
_PyFrame_SetStackPointer(frame, stack_pointer);
|
_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);
|
stack_pointer = _PyFrame_GetStackPointer(frame);
|
||||||
frame->tlbc_index = ((_PyThreadStateImpl *)tstate)->tlbc_index;
|
frame->tlbc_index = ((_PyThreadStateImpl *)tstate)->tlbc_index;
|
||||||
frame->instr_ptr = bytecode + off;
|
frame->instr_ptr = bytecode + off;
|
||||||
|
|
@ -6898,7 +6898,7 @@
|
||||||
stack_pointer = _PyFrame_GetStackPointer(frame);
|
stack_pointer = _PyFrame_GetStackPointer(frame);
|
||||||
if (bytecode == NULL) goto error;
|
if (bytecode == NULL) goto error;
|
||||||
_PyFrame_SetStackPointer(frame, stack_pointer);
|
_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);
|
stack_pointer = _PyFrame_GetStackPointer(frame);
|
||||||
frame->tlbc_index = ((_PyThreadStateImpl *)tstate)->tlbc_index;
|
frame->tlbc_index = ((_PyThreadStateImpl *)tstate)->tlbc_index;
|
||||||
frame->instr_ptr = bytecode + off;
|
frame->instr_ptr = bytecode + off;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue