mirror of
https://github.com/python/cpython.git
synced 2025-07-08 03:45:36 +00:00
bpo-47177: Replace f_lasti
with prev_instr
(GH-32208)
This commit is contained in:
parent
87eec70d97
commit
ef6a482b02
10 changed files with 90 additions and 75 deletions
|
@ -127,3 +127,10 @@ _PyFrame_Push(PyThreadState *tstate, PyFunctionObject *func)
|
|||
_PyFrame_InitializeSpecials(new_frame, func, NULL, code->co_nlocalsplus);
|
||||
return new_frame;
|
||||
}
|
||||
|
||||
int
|
||||
_PyInterpreterFrame_GetLine(_PyInterpreterFrame *frame)
|
||||
{
|
||||
int addr = _PyInterpreterFrame_LASTI(frame) * sizeof(_Py_CODEUNIT);
|
||||
return PyCode_Addr2Line(frame->f_code, addr);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue