summaryrefslogtreecommitdiffstats
path: root/Modules/_tracemalloc.c
diff options
context:
space:
mode:
authorBrandt Bucher <brandtbucher@microsoft.com>2022-04-07 19:31:01 (GMT)
committerGitHub <noreply@github.com>2022-04-07 19:31:01 (GMT)
commitef6a482b0285870c45f39c9b17ed827362b334ae (patch)
treea32a27a4d209b974d9f4d92e7e997dc3ff771409 /Modules/_tracemalloc.c
parent87eec70d97b250f820325b4f1b4f781b443b5180 (diff)
downloadcpython-ef6a482b0285870c45f39c9b17ed827362b334ae.zip
cpython-ef6a482b0285870c45f39c9b17ed827362b334ae.tar.gz
cpython-ef6a482b0285870c45f39c9b17ed827362b334ae.tar.bz2
bpo-47177: Replace `f_lasti` with `prev_instr` (GH-32208)
Diffstat (limited to 'Modules/_tracemalloc.c')
-rw-r--r--Modules/_tracemalloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_tracemalloc.c b/Modules/_tracemalloc.c
index 738d545..ae09869 100644
--- a/Modules/_tracemalloc.c
+++ b/Modules/_tracemalloc.c
@@ -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;
}