diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2021-10-03 18:22:42 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-03 18:22:42 (GMT) |
commit | 60b9e040c9cf40e69f42c0008e564458aa0379e8 (patch) | |
tree | c443c7e9b242382b5b19ce0e5209656bdfa88873 /Modules | |
parent | 4f6e0680d0d8545aa151ccd9de56a39bfe9532a2 (diff) | |
download | cpython-60b9e040c9cf40e69f42c0008e564458aa0379e8.zip cpython-60b9e040c9cf40e69f42c0008e564458aa0379e8.tar.gz cpython-60b9e040c9cf40e69f42c0008e564458aa0379e8.tar.bz2 |
bpo-45355: Use sizeof(_Py_CODEUNIT) instead of literal 2 for the size of the code unit (GH-28711)
Diffstat (limited to 'Modules')
-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 fc3d7f5..09d18fb 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; } |