diff options
| author | Serhiy Storchaka <storchaka@gmail.com> | 2021-10-03 21:22:42 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-03 21:22:42 +0300 |
| commit | 60b9e040c9cf40e69f42c0008e564458aa0379e8 (patch) | |
| tree | c443c7e9b242382b5b19ce0e5209656bdfa88873 /Modules/_tracemalloc.c | |
| parent | 4f6e0680d0d8545aa151ccd9de56a39bfe9532a2 (diff) | |
| download | cpython-git-60b9e040c9cf40e69f42c0008e564458aa0379e8.tar.gz | |
bpo-45355: Use sizeof(_Py_CODEUNIT) instead of literal 2 for the size of the code unit (GH-28711)
Diffstat (limited to 'Modules/_tracemalloc.c')
| -rw-r--r-- | Modules/_tracemalloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_tracemalloc.c b/Modules/_tracemalloc.c index fc3d7f51ee..09d18fb8f2 100644 --- a/Modules/_tracemalloc.c +++ b/Modules/_tracemalloc.c @@ -302,7 +302,7 @@ static void tracemalloc_get_frame(InterpreterFrame *pyframe, frame_t *frame) { frame->filename = unknown_filename; - int lineno = PyCode_Addr2Line(pyframe->f_code, pyframe->f_lasti*2); + int lineno = PyCode_Addr2Line(pyframe->f_code, pyframe->f_lasti*sizeof(_Py_CODEUNIT)); if (lineno < 0) { lineno = 0; } |
