diff options
author | msofer <msofer@noemail.net> | 2005-11-18 23:07:26 (GMT) |
---|---|---|
committer | msofer <msofer@noemail.net> | 2005-11-18 23:07:26 (GMT) |
commit | 7eec16d25b5c416be1468236ddaa14586e2a2409 (patch) | |
tree | 55f1b4ed5f653180f0ac89f9dfb2510b141648c0 /generic/tclCmdMZ.c | |
parent | 702bac2dfb814d1644e097ae0eadf9483d8ee49b (diff) | |
download | tcl-7eec16d25b5c416be1468236ddaa14586e2a2409.zip tcl-7eec16d25b5c416be1468236ddaa14586e2a2409.tar.gz tcl-7eec16d25b5c416be1468236ddaa14586e2a2409.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].
FossilOrigin-Name: 56a462e45ca6948aca94cef4232dec3080078aa1
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--; |