summaryrefslogtreecommitdiff
path: root/Python/traceback.c
diff options
context:
space:
mode:
authorMichael W. Hudson <mwh@python.net>2003-02-22 13:07:53 +0000
committerMichael W. Hudson <mwh@python.net>2003-02-22 13:07:53 +0000
commit91a16f873c26ced6c3c203e09a6cdabf35f7a2b5 (patch)
tree24c1cd6b0de51b420652d9283e12aa8c64e94073 /Python/traceback.c
parent7bcd3fdb22e2fbd53c6d3476a9210e330e040782 (diff)
downloadcpython-91a16f873c26ced6c3c203e09a6cdabf35f7a2b5.tar.gz
After the removal of SET_LINENO, PyCode_Addr2Line has always been
called to find tb_lineno -- even if Py_OptimizeFlag is true. So don't call it again when printing the traceback.
Diffstat (limited to 'Python/traceback.c')
-rw-r--r--Python/traceback.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/Python/traceback.c b/Python/traceback.c
index 27c69b68e5..b8edf13964 100644
--- a/Python/traceback.c
+++ b/Python/traceback.c
@@ -238,9 +238,6 @@ tb_printinternal(tracebackobject *tb, PyObject *f, int limit)
}
while (tb != NULL && err == 0) {
if (depth <= limit) {
- if (Py_OptimizeFlag)
- tb->tb_lineno = PyCode_Addr2Line(
- tb->tb_frame->f_code, tb->tb_lasti);
err = tb_displayline(f,
PyString_AsString(
tb->tb_frame->f_code->co_filename),