summaryrefslogtreecommitdiffstats
path: root/generic/tclIOGT.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2004-10-19 21:53:47 (GMT)
committerdgp <dgp@users.sourceforge.net>2004-10-19 21:53:47 (GMT)
commitff2e42113f72c49be25be40042c28571c3a97c30 (patch)
treeb5e581d2da471e1291e0dcb7cd21a9c3d2ff09d3 /generic/tclIOGT.c
parentc1d97ce12a7418450665a45cf72e0e220fbf742e (diff)
downloadtcl-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/tclIOGT.c')
-rw-r--r--generic/tclIOGT.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/generic/tclIOGT.c b/generic/tclIOGT.c
index 22e5362..37b57be 100644
--- a/generic/tclIOGT.c
+++ b/generic/tclIOGT.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * CVS: $Id: tclIOGT.c,v 1.10 2004/10/06 13:47:34 dkf Exp $
+ * CVS: $Id: tclIOGT.c,v 1.11 2004/10/19 21:54:07 dgp Exp $
*/
#include "tclInt.h"
@@ -383,13 +383,13 @@ ExecuteCallback (dataPtr, interp, op, buf, bufLen, transmit, preserve)
Tcl_Obj* resObj; /* See below, switch (transmit) */
int resLen;
unsigned char* resBuf;
- Tcl_SavedResult ciSave;
+ TclInterpState state = NULL;
int res = TCL_OK;
Tcl_Obj* command = Tcl_DuplicateObj (dataPtr->command);
Tcl_Obj* temp;
if (preserve) {
- Tcl_SaveResult (dataPtr->interp, &ciSave);
+ state = TclSaveInterpState(dataPtr->interp, res);
}
if (command == (Tcl_Obj*) NULL) {
@@ -488,14 +488,14 @@ ExecuteCallback (dataPtr, interp, op, buf, bufLen, transmit, preserve)
Tcl_ResetResult(dataPtr->interp);
if (preserve) {
- Tcl_RestoreResult(dataPtr->interp, &ciSave);
+ (void) TclRestoreInterpState(dataPtr->interp, state);
}
return res;
cleanup:
if (preserve) {
- Tcl_RestoreResult(dataPtr->interp, &ciSave);
+ (void) TclRestoreInterpState(dataPtr->interp, state);
}
if (command != (Tcl_Obj*) NULL) {