diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclBasic.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 6fc9dd3..c5c842d 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.181 2005/11/13 01:38:15 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.182 2005/11/14 16:45:11 dgp Exp $ */ #include "tclInt.h" @@ -2612,6 +2612,7 @@ CallCommandTraces( ActiveCommandTrace active; char *result; Tcl_Obj *oldNamePtr = NULL; + Tcl_InterpState state = NULL; if (cmdPtr->flags & CMD_TRACE_ACTIVE) { /* @@ -2662,6 +2663,9 @@ CallCommandTraces( oldName = TclGetString(oldNamePtr); } tracePtr->refCount++; + if (state == NULL) { + state = Tcl_SaveInterpState((Tcl_Interp *)iPtr, TCL_OK); + } (*tracePtr->traceProc)(tracePtr->clientData, (Tcl_Interp *) iPtr, oldName, newName, flags); cmdPtr->flags &= ~tracePtr->flags; @@ -2670,6 +2674,10 @@ CallCommandTraces( } } + if (state) { + Tcl_RestoreInterpState((Tcl_Interp *)iPtr, state); + } + /* * If a new object was created to hold the full oldName, free it now. */ |