summaryrefslogtreecommitdiffstats
path: root/Python/traceback.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2021-10-04 12:01:11 (GMT)
committerGitHub <noreply@github.com>2021-10-04 12:01:11 (GMT)
commitb5499784ec0aa24c8f0d91f2317cc53b7743ada9 (patch)
treea136bc5dc197cf3041bb6c234ea663debd2d631c /Python/traceback.c
parentf146ca36f81075f222aa3a1595042597d96dfad3 (diff)
downloadcpython-b5499784ec0aa24c8f0d91f2317cc53b7743ada9.zip
cpython-b5499784ec0aa24c8f0d91f2317cc53b7743ada9.tar.gz
cpython-b5499784ec0aa24c8f0d91f2317cc53b7743ada9.tar.bz2
[3.10] bpo-45355: Use sizeof(_Py_CODEUNIT) instead of literal 2 for the size of the code unit (GH-28711). (GH-28718)
(cherry picked from commit 60b9e040c9cf40e69f42c0008e564458aa0379e8)
Diffstat (limited to 'Python/traceback.c')
-rw-r--r--Python/traceback.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/traceback.c b/Python/traceback.c
index 9b23f45..284c181 100644
--- a/Python/traceback.c
+++ b/Python/traceback.c
@@ -234,7 +234,7 @@ _PyTraceBack_FromFrame(PyObject *tb_next, PyFrameObject *frame)
assert(tb_next == NULL || PyTraceBack_Check(tb_next));
assert(frame != NULL);
- return tb_create_raw((PyTracebackObject *)tb_next, frame, frame->f_lasti*2,
+ return tb_create_raw((PyTracebackObject *)tb_next, frame, frame->f_lasti*sizeof(_Py_CODEUNIT),
PyFrame_GetLineNumber(frame));
}