diff options
author | Mark Shannon <mark@hotpy.org> | 2023-05-05 16:53:07 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-05 16:53:07 (GMT) |
commit | a0df9ee8fc77443510ab7e9ba8fd830f255a8fec (patch) | |
tree | 2af48b491e6dcd471fd16f04e6ae87a85b1097cd /Modules | |
parent | 45a9e3834a6ed20ee250e2e5a8583dffcef0eb73 (diff) | |
download | cpython-a0df9ee8fc77443510ab7e9ba8fd830f255a8fec.zip cpython-a0df9ee8fc77443510ab7e9ba8fd830f255a8fec.tar.gz cpython-a0df9ee8fc77443510ab7e9ba8fd830f255a8fec.tar.bz2 |
GH-96803: Add three C-API functions to make _PyInterpreterFrame less opaque for users of PEP 523. (GH-96849)
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_tracemalloc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/_tracemalloc.c b/Modules/_tracemalloc.c index d69c563..c5714d5 100644 --- a/Modules/_tracemalloc.c +++ b/Modules/_tracemalloc.c @@ -7,6 +7,7 @@ #include "pycore_runtime.h" // _Py_ID() #include "pycore_traceback.h" #include <pycore_frame.h> +#include "frameobject.h" // _PyInterpreterFrame_GetLine #include <stdlib.h> // malloc() @@ -257,7 +258,7 @@ static void tracemalloc_get_frame(_PyInterpreterFrame *pyframe, frame_t *frame) { frame->filename = &_Py_STR(anon_unknown); - int lineno = _PyInterpreterFrame_GetLine(pyframe); + int lineno = PyUnstable_InterpreterFrame_GetLine(pyframe); if (lineno < 0) { lineno = 0; } |