[Python-checkins] python/dist/src/Python ceval.c,2.419,2.419.2.1
bwarsaw@users.sourceforge.net
bwarsaw at users.sourceforge.net
Mon Aug 15 19:33:07 CEST 2005
Update of /cvsroot/python/python/dist/src/Python
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20452/Python
Modified Files:
Tag: release24-maint
ceval.c
Log Message:
Fix for SF bug # 900092, hotshot.stats.load assertion failure. This patch
restores the tracing of a 'return' event for exceptions that cause a function
to exit. Also, update the unit test.
I will port to Python 2.5.
Index: ceval.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v
retrieving revision 2.419
retrieving revision 2.419.2.1
diff -u -d -r2.419 -r2.419.2.1
--- ceval.c 23 Nov 2004 18:06:08 -0000 2.419
+++ ceval.c 15 Aug 2005 17:32:56 -0000 2.419.2.1
@@ -2462,14 +2462,20 @@
fast_yield:
if (tstate->use_tracing) {
- if (tstate->c_tracefunc
- && (why == WHY_RETURN || why == WHY_YIELD)) {
- if (call_trace(tstate->c_tracefunc,
- tstate->c_traceobj, f,
- PyTrace_RETURN, retval)) {
- Py_XDECREF(retval);
- retval = NULL;
- why = WHY_EXCEPTION;
+ if (tstate->c_tracefunc) {
+ if (why == WHY_RETURN || why == WHY_YIELD) {
+ if (call_trace(tstate->c_tracefunc,
+ tstate->c_traceobj, f,
+ PyTrace_RETURN, retval)) {
+ Py_XDECREF(retval);
+ retval = NULL;
+ why = WHY_EXCEPTION;
+ }
+ }
+ else if (why == WHY_EXCEPTION) {
+ call_trace_protected(tstate->c_tracefunc,
+ tstate->c_traceobj, f,
+ PyTrace_RETURN);
}
}
if (tstate->c_profilefunc) {
More information about the Python-checkins
mailing list