diff options
author | Miguel Sofer <miguel.sofer@gmail.com> | 2005-11-18 23:07:26 (GMT) |
---|---|---|
committer | Miguel Sofer <miguel.sofer@gmail.com> | 2005-11-18 23:07:26 (GMT) |
commit | c97535ea03fe482ec1293e11b276eb40fd2faeb8 (patch) | |
tree | 55f1b4ed5f653180f0ac89f9dfb2510b141648c0 /generic/tclCmdMZ.c | |
parent | cb651f0210eff616b6ee84c8c2146bd5f1f2f320 (diff) | |
download | tcl-c97535ea03fe482ec1293e11b276eb40fd2faeb8.zip tcl-c97535ea03fe482ec1293e11b276eb40fd2faeb8.tar.gz tcl-c97535ea03fe482ec1293e11b276eb40fd2faeb8.tar.bz2 |
* generic/tclBasic.c (Tcl_DeleteCommandFromToken):
* generic/tclCmdMZ.c (TraceCommandProc):
* generic/tclInt.h (NS_KILLED):
* generic/tclNamesp.c (Tcl_DeleteNamespace
* tests/namespace.test (namespace-7.3-6):
* tests/trace.test (trace-20.13-16): fix [Bugs 1355942/1355342].
Diffstat (limited to 'generic/tclCmdMZ.c')
-rw-r--r-- | generic/tclCmdMZ.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index ea272b7..9aaa6cb 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.24 2005/11/08 14:53:12 dkf Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.82.2.25 2005/11/18 23:07:27 msofer Exp $ */ #include "tclInt.h" @@ -4167,9 +4167,18 @@ TraceCommandProc(clientData, interp, oldName, newName, flags) * Remove the trace since TCL_TRACE_DESTROYED tells us to, or the * command we're tracing has just gone away. Then decrement the * clientData refCount that was set up by trace creation. + * + * Note that we save the (return) state of the interpreter to prevent + * bizarre error messages. */ + + Tcl_SaveResult(interp, &state); + stateCode = iPtr->returnCode; Tcl_UntraceCommand(interp, oldName, untraceFlags, TraceCommandProc, clientData); + Tcl_RestoreResult(interp, &state); + iPtr->returnCode = stateCode; + tcmdPtr->refCount--; } tcmdPtr->refCount--; |