diff options
author | dgp <dgp@noemail.net> | 2005-11-01 20:19:26 (GMT) |
---|---|---|
committer | dgp <dgp@noemail.net> | 2005-11-01 20:19:26 (GMT) |
commit | 37d5152bf2b86ed4630b41c1d1e3e09b36acef0d (patch) | |
tree | 3e0c0ef9b01b34839d99e90c3ac83e15926ea447 /generic | |
parent | 2ad5becaabd68d36a47fe627b4692bc532877257 (diff) | |
download | tcl-37d5152bf2b86ed4630b41c1d1e3e09b36acef0d.zip tcl-37d5152bf2b86ed4630b41c1d1e3e09b36acef0d.tar.gz tcl-37d5152bf2b86ed4630b41c1d1e3e09b36acef0d.tar.bz2 |
* generic/tclCmdMZ.c (TclCheckExecutionTraces): Corrected mistaken
assumption that all command traces are set at the script level.
Report/fix from Jacques H. de Villiers. [Bug 1337941]
FossilOrigin-Name: 2a6bcd3750a89ece869c0441799767ee6087c6f4
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclCmdMZ.c | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index b2f5919..f4c7765 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.82.2.22 2005/10/29 17:45:23 msofer Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.82.2.23 2005/11/01 20:19:26 dgp Exp $ */ #include "tclInt.h" @@ -4223,19 +4223,21 @@ TclCheckExecutionTraces(interp, command, numChars, cmdPtr, code, active.reverseScan = 0; active.nextTracePtr = tracePtr->nextPtr; } - tcmdPtr = (TraceCommandInfo*)tracePtr->clientData; - if (tcmdPtr->flags != 0) { - tcmdPtr->curFlags = traceFlags | TCL_TRACE_EXEC_DIRECT; - tcmdPtr->curCode = code; - tcmdPtr->refCount++; - traceCode = TraceExecutionProc((ClientData)tcmdPtr, interp, - curLevel, command, (Tcl_Command)cmdPtr, objc, objv); - tcmdPtr->refCount--; - if (tcmdPtr->refCount < 0) { - Tcl_Panic("TclCheckExecutionTraces: negative TraceCommandInfo refCount"); - } - if (tcmdPtr->refCount == 0) { - ckfree((char*)tcmdPtr); + if (tracePtr->traceProc == TraceCommandProc) { + tcmdPtr = (TraceCommandInfo*)tracePtr->clientData; + if (tcmdPtr->flags != 0) { + tcmdPtr->curFlags = traceFlags | TCL_TRACE_EXEC_DIRECT; + tcmdPtr->curCode = code; + tcmdPtr->refCount++; + traceCode = TraceExecutionProc((ClientData)tcmdPtr, interp, + curLevel, command, (Tcl_Command)cmdPtr, objc, objv); + tcmdPtr->refCount--; + if (tcmdPtr->refCount < 0) { + Tcl_Panic("TclCheckExecutionTraces: negative TraceCommandInfo refCount"); + } + if (tcmdPtr->refCount == 0) { + ckfree((char*)tcmdPtr); + } } } if (active.nextTracePtr) { |