Skip to content

Commit 7dd3c2b

Browse files
authored
gh-109094: remove redundant arg to _PyFrame_PushTrampolineUnchecked (GH-110759)
1 parent 19b7ead commit 7dd3c2b

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Include/internal/pycore_frame.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ _PyFrame_PushUnchecked(PyThreadState *tstate, PyFunctionObject *func, int null_l
282282
/* Pushes a trampoline frame without checking for space.
283283
* Must be guarded by _PyThreadState_HasStackSpace() */
284284
static inline _PyInterpreterFrame *
285-
_PyFrame_PushTrampolineUnchecked(PyThreadState *tstate, PyCodeObject *code, int stackdepth, int prev_instr)
285+
_PyFrame_PushTrampolineUnchecked(PyThreadState *tstate, PyCodeObject *code, int stackdepth)
286286
{
287287
CALL_STAT_INC(frames_pushed);
288288
_PyInterpreterFrame *frame = (_PyInterpreterFrame *)tstate->datastack_top;
@@ -297,7 +297,7 @@ _PyFrame_PushTrampolineUnchecked(PyThreadState *tstate, PyCodeObject *code, int
297297
frame->f_locals = NULL;
298298
frame->stacktop = code->co_nlocalsplus + stackdepth;
299299
frame->frame_obj = NULL;
300-
frame->prev_instr = _PyCode_CODE(code) + prev_instr;
300+
frame->prev_instr = _PyCode_CODE(code);
301301
frame->owner = FRAME_OWNED_BY_THREAD;
302302
frame->return_offset = 0;
303303
return frame;

Python/bytecodes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3204,7 +3204,7 @@ dummy_func(
32043204
}
32053205
Py_DECREF(tp);
32063206
_PyInterpreterFrame *shim = _PyFrame_PushTrampolineUnchecked(
3207-
tstate, (PyCodeObject *)&_Py_InitCleanup, 1, 0);
3207+
tstate, (PyCodeObject *)&_Py_InitCleanup, 1);
32083208
assert(_PyCode_CODE((PyCodeObject *)shim->f_executable)[1].op.code == EXIT_INIT_CHECK);
32093209
/* Push self onto stack of shim */
32103210
Py_INCREF(self);

Python/generated_cases.c.h

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)