summaryrefslogtreecommitdiffstats
path: root/generic/tclIOGT.c
diff options
context:
space:
mode:
authordgp <dgp@noemail.net>2004-10-19 21:53:46 (GMT)
committerdgp <dgp@noemail.net>2004-10-19 21:53:46 (GMT)
commita3517bb7166d2a6837234712a3167506a77bfe36 (patch)
treeb5e581d2da471e1291e0dcb7cd21a9c3d2ff09d3 /generic/tclIOGT.c
parentff8de14f8b698ea21d5ac79b0fbac91833750afe (diff)
downloadtcl-a3517bb7166d2a6837234712a3167506a77bfe36.zip
tcl-a3517bb7166d2a6837234712a3167506a77bfe36.tar.gz
tcl-a3517bb7166d2a6837234712a3167506a77bfe36.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. FossilOrigin-Name: 4073981ce31d5d39260dd1a9e458920306833f50
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) {