mirror of
https://github.com/python/cpython.git
synced 2025-08-22 01:35:16 +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
|
@ -308,7 +308,7 @@ static void
|
|||
tracemalloc_get_frame(_PyInterpreterFrame *pyframe, frame_t *frame)
|
||||
{
|
||||
frame->filename = &_Py_STR(anon_unknown);
|
||||
int lineno = PyCode_Addr2Line(pyframe->f_code, pyframe->f_lasti*sizeof(_Py_CODEUNIT));
|
||||
int lineno = _PyInterpreterFrame_GetLine(pyframe);
|
||||
if (lineno < 0) {
|
||||
lineno = 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue