Core and builtins
-----------------
+- SF bug #900092: When tracing (e.g. for hotshot), restore 'return' events for
+ exceptions that cause a function to exit.
+
- The implementation of set() and frozenset() was revised to use its
own internal data structure. Memory consumption is reduced by 1/3
and there are modest speed-ups as well. The API is unchanged.
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) {