diff options
author | dgp <dgp@users.sourceforge.net> | 2005-03-10 20:22:34 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2005-03-10 20:22:34 (GMT) |
commit | 9890148128fcae17341f06ebb7fc8fbd9bca7066 (patch) | |
tree | 9b2e6d0e74234670da25a25c7fb47684fba6ea5b | |
parent | e46d4e8948545865b1ab01bd9ba6eb18f826619d (diff) | |
download | tcl-9890148128fcae17341f06ebb7fc8fbd9bca7066.zip tcl-9890148128fcae17341f06ebb7fc8fbd9bca7066.tar.gz tcl-9890148128fcae17341f06ebb7fc8fbd9bca7066.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]
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | generic/tclCmdMZ.c | 23 |
2 files changed, 17 insertions, 12 deletions
@@ -1,3 +1,9 @@ +2005-03-10 Don Porter <dgp@users.sourceforge.net> + + * generic/tclCmdMZ.c (TclCheckInterpTraces): Corrected mistaken + cast of ClientData to (TraceCommandInfo *) when not warranted. + Thanks to Yuri Victorovich for the report. [Bug 1153871] + 2005-03-08 Jeff Hobbs <jeffh@ActiveState.com> * win/makefile.vc: clarify necessary defined vars that can come 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 */ |