diff options
author | dgp <dgp@noemail.net> | 2005-03-10 20:22:33 (GMT) |
---|---|---|
committer | dgp <dgp@noemail.net> | 2005-03-10 20:22:33 (GMT) |
commit | 1434182da41381601c8ef1f96a6d4e1c1124183c (patch) | |
tree | 9b2e6d0e74234670da25a25c7fb47684fba6ea5b /generic | |
parent | 576f021f23730b63c169a7a5a64e4c8c9727827b (diff) | |
download | tcl-1434182da41381601c8ef1f96a6d4e1c1124183c.zip tcl-1434182da41381601c8ef1f96a6d4e1c1124183c.tar.gz tcl-1434182da41381601c8ef1f96a6d4e1c1124183c.tar.bz2 |
* generic/tclCmdMZ.c (TclCheckInterpTraces): Corrected mistaken
cast of ClientData to (TraceCommandInfo *) when not warranted.
Thanks to Yuri Victorovich for the report. [Bug 1153871]
FossilOrigin-Name: 5e6df95dbf0fc88c3f9b4906aa393103ecf055e8
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclCmdMZ.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index b4313cb..0b71be6 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.13 2004/11/15 21:14:32 dgp Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.82.2.14 2005/03/10 20:22:42 dgp Exp $ */ #include "tclInt.h" @@ -4263,7 +4263,6 @@ TclCheckInterpTraces(interp, command, numChars, cmdPtr, code, ActiveInterpTrace active; int curLevel; int traceCode = TCL_OK; - TraceCommandInfo* tcmdPtr; if (command == NULL || iPtr->tracePtr == NULL || (iPtr->flags & INTERP_TRACE_IN_PROGRESS)) { @@ -4313,16 +4312,16 @@ TclCheckInterpTraces(interp, command, numChars, cmdPtr, code, if (tracePtr->flags & (TCL_TRACE_ENTER_EXEC | TCL_TRACE_LEAVE_EXEC)) { /* New style trace */ - if ((tracePtr->flags != TCL_TRACE_EXEC_IN_PROGRESS) && - ((tracePtr->flags & traceFlags) != 0)) { - tcmdPtr = (TraceCommandInfo*)tracePtr->clientData; - tcmdPtr->curFlags = traceFlags; - tcmdPtr->curCode = code; - traceCode = (tracePtr->proc)((ClientData)tcmdPtr, - (Tcl_Interp*)interp, - curLevel, command, - (Tcl_Command)cmdPtr, - objc, objv); + if (tracePtr->flags & traceFlags) { + if (tracePtr->proc == TraceExecutionProc) { + TraceCommandInfo *tcmdPtr = + (TraceCommandInfo *) tracePtr->clientData; + tcmdPtr->curFlags = traceFlags; + tcmdPtr->curCode = code; + } + traceCode = (tracePtr->proc)(tracePtr->clientData, + interp, curLevel, command, (Tcl_Command)cmdPtr, + objc, objv); } } else { /* Old-style trace */ |