summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael W. Hudson <mwh@python.net>2003-02-22 13:07:53 (GMT)
committerMichael W. Hudson <mwh@python.net>2003-02-22 13:07:53 (GMT)
commitc85b6a2d4d35d6ee0053a8f5870113512c1cdcb6 (patch)
treeb6d09582de2d4d21a7a82e9e773bf49671bb6b9c
parentd9bb1a0b01c65e7c8eecb5024ee58d91f967e2e4 (diff)
downloadcpython-c85b6a2d4d35d6ee0053a8f5870113512c1cdcb6.zip
cpython-c85b6a2d4d35d6ee0053a8f5870113512c1cdcb6.tar.gz
cpython-c85b6a2d4d35d6ee0053a8f5870113512c1cdcb6.tar.bz2
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.
-rw-r--r--Python/traceback.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/Python/traceback.c b/Python/traceback.c
index 27c69b6..b8edf13 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),