summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2006-04-04 14:26:39 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2006-04-04 14:26:39 (GMT)
commited40ea115966cfa771a698bfed8f7fc663220e27 (patch)
treef7e4cb75599ed45aa8329e847e63234f5652c242 /Python
parent768018592cabfbf1e3199bd25b14ceec54476ce3 (diff)
downloadcpython-ed40ea115966cfa771a698bfed8f7fc663220e27.zip
cpython-ed40ea115966cfa771a698bfed8f7fc663220e27.tar.gz
cpython-ed40ea115966cfa771a698bfed8f7fc663220e27.tar.bz2
Generate line number table entries for except handlers.
Re-enable all the tests in test_trace.py except one. Still not sure that these tests test what they used to test, but they pass. One failing test seems to be caused by undocumented line number table behavior in Python 2.4.
Diffstat (limited to 'Python')
-rw-r--r--Python/compile.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 0f7246b..3f73255 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -2398,6 +2398,8 @@ compiler_try_except(struct compiler *c, stmt_ty s)
s->v.TryExcept.handlers, i);
if (!handler->type && i < n-1)
return compiler_error(c, "default 'except:' must be last");
+ c->u->u_lineno_set = false;
+ c->u->u_lineno = handler->lineno;
except = compiler_new_block(c);
if (except == NULL)
return 0;