diff options
author | dgp <dgp@users.sourceforge.net> | 2004-10-19 21:53:47 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2004-10-19 21:53:47 (GMT) |
commit | ff2e42113f72c49be25be40042c28571c3a97c30 (patch) | |
tree | b5e581d2da471e1291e0dcb7cd21a9c3d2ff09d3 /generic/tclBasic.c | |
parent | c1d97ce12a7418450665a45cf72e0e220fbf742e (diff) | |
download | tcl-ff2e42113f72c49be25be40042c28571c3a97c30.zip tcl-ff2e42113f72c49be25be40042c28571c3a97c30.tar.gz tcl-ff2e42113f72c49be25be40042c28571c3a97c30.tar.bz2 |
* generic/tclInt.h (Tcl*InterpState): New internal routines
* generic/tclResult.c (Tcl*InterpState): TclSaveInterpState,
TclRestoreInterpState, and TclDiscardInterpState are superior
replacements for Tcl_(Save|Restore|Discard)Result. Intent is that
these routines will be converted to public routines after TIP approval.
* generic/tclBasic.c (TclEvalObjvInternal):
* generic/tclDictObj.c (DictUpdateCmd, DictWithCmd):
* generic/tclIOGT.c (ExecuteCallback):
* generic/tclTrace.c (Trace*Proc,TclCheck*Traces,TclCallVarTraces):
Callers of Tcl_*Result updated to call the new routines. The
calls were relocated in several cases to perform save/restore
operations only when needed.
* generic/tclEvent.c (HandleBgErrors):
* generic/tclFCmd.c (CopyRenameOneFile):
Calls to Tcl_*Result that were eliminated because they appeared
to serve no useful purpose, typically saving/restoring an error
message, only to throw it away.
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r-- | generic/tclBasic.c | 35 |
1 files changed, 1 insertions, 34 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 84b934d..c568e30 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.128 2004/10/18 21:15:34 dgp Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.129 2004/10/19 21:54:06 dgp Exp $ */ #include "tclInt.h" @@ -3059,17 +3059,6 @@ TclEvalObjvInternal(interp, objc, objv, command, length, flags) * Call 'leave' command traces */ if (!(cmdPtr->flags & CMD_IS_DELETED)) { - int saveErrFlags = iPtr->flags & ERR_ALREADY_LOGGED; - Tcl_Obj *saveOptions = iPtr->returnOpts; - Tcl_Obj *saveErrInfo = iPtr->errorInfo; - Tcl_Obj *saveErrCode = iPtr->errorCode; - if (saveErrInfo) { - Tcl_IncrRefCount(saveErrInfo); - } - if (saveErrCode) { - Tcl_IncrRefCount(saveErrCode); - } - Tcl_IncrRefCount(saveOptions); if ((cmdPtr->flags & CMD_HAS_EXEC_TRACES) && (traceCode == TCL_OK)) { traceCode = TclCheckExecutionTraces(interp, command, length, cmdPtr, code, TCL_TRACE_LEAVE_EXEC, objc, objv); @@ -3078,28 +3067,6 @@ TclEvalObjvInternal(interp, objc, objv, command, length, flags) traceCode = TclCheckInterpTraces(interp, command, length, cmdPtr, code, TCL_TRACE_LEAVE_EXEC, objc, objv); } - if (traceCode == TCL_OK) { - Tcl_DecrRefCount(iPtr->returnOpts); - iPtr->returnOpts = saveOptions; - Tcl_IncrRefCount(iPtr->returnOpts); - iPtr->flags |= saveErrFlags; - if (iPtr->errorCode) { - Tcl_DecrRefCount(iPtr->errorCode); - } - iPtr->errorCode = saveErrCode; - if (iPtr->errorInfo) { - Tcl_DecrRefCount(iPtr->errorInfo); - } - iPtr->errorInfo = saveErrInfo; - } else { - if (saveErrCode) { - Tcl_DecrRefCount(saveErrCode); - } - if (saveErrInfo) { - Tcl_DecrRefCount(saveErrInfo); - } - } - Tcl_DecrRefCount(saveOptions); } TclCleanupCommand(cmdPtr); |