diff options
author | mig <mig> | 2013-01-07 04:21:38 (GMT) |
---|---|---|
committer | mig <mig> | 2013-01-07 04:21:38 (GMT) |
commit | 822c5d44a9c15c0be0ad270775d5a96aa9a71e72 (patch) | |
tree | 3955843633ca8428aefb9169a994a99a1a06b177 | |
parent | e82e2ca61ca3d82c33ef64b6ff754c704df94318 (diff) | |
download | tcl-822c5d44a9c15c0be0ad270775d5a96aa9a71e72.zip tcl-822c5d44a9c15c0be0ad270775d5a96aa9a71e72.tar.gz tcl-822c5d44a9c15c0be0ad270775d5a96aa9a71e72.tar.bz2 |
move TCL_EVAL_REDIRECT from iPtr->evalFlags (tclInt.h) to flags passed to the eval functions (tcl.h)
-rw-r--r-- | generic/tcl.h | 2 | ||||
-rw-r--r-- | generic/tclBasic.c | 7 | ||||
-rw-r--r-- | generic/tclEnsemble.c | 7 | ||||
-rw-r--r-- | generic/tclExecute.c | 4 | ||||
-rw-r--r-- | generic/tclInt.h | 1 | ||||
-rw-r--r-- | generic/tclInterp.c | 3 | ||||
-rw-r--r-- | generic/tclNamesp.c | 4 |
7 files changed, 13 insertions, 15 deletions
diff --git a/generic/tcl.h b/generic/tcl.h index 3003abf..e64dc26 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -1068,6 +1068,8 @@ typedef struct Tcl_DString { #define TCL_EVAL_INVOKE 0x080000 #define TCL_CANCEL_UNWIND 0x100000 #define TCL_EVAL_NOERR 0x200000 +#define TCL_EVAL_REDIRECT 0x400000 + /* * Special freeProc values that may be passed to Tcl_SetResult (see the man diff --git a/generic/tclBasic.c b/generic/tclBasic.c index b4b903f..ac80605 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -4174,9 +4174,8 @@ TclNREvalObjv( * finishes the source command and not just the target. */ - if (iPtr->evalFlags & TCL_EVAL_REDIRECT) { + if (flags & TCL_EVAL_REDIRECT) { TclNRAddCallback(interp, NRCommand, NULL, INT2PTR(1), INT2PTR(objc), objv); - iPtr->evalFlags &= ~TCL_EVAL_REDIRECT; } else { TclNRAddCallback(interp, NRCommand, NULL, NULL, INT2PTR(objc), objv); } @@ -4635,8 +4634,8 @@ TEOV_NotFound( } TclDeferCallback(interp, TEOV_NotFoundCallback, INT2PTR(handlerObjc), newObjv, savedNsPtr, NULL); - iPtr->evalFlags |= TCL_EVAL_REDIRECT; - return TclNREvalObjv(interp, newObjc, newObjv, TCL_EVAL_NOERR, NULL); + return TclNREvalObjv(interp, newObjc, newObjv, (TCL_EVAL_NOERR|TCL_EVAL_REDIRECT), + NULL); } static int diff --git a/generic/tclEnsemble.c b/generic/tclEnsemble.c index 9a2d598..48cac8d 100644 --- a/generic/tclEnsemble.c +++ b/generic/tclEnsemble.c @@ -1914,8 +1914,8 @@ NsEnsembleImplementationCmdNR( * Hand off to the target command. */ - iPtr->evalFlags |= TCL_EVAL_REDIRECT; - return TclNREvalObjEx(interp, copyPtr, TCL_EVAL_INVOKE, NULL,INT_MIN); + return TclNREvalObjEx(interp, copyPtr, + (TCL_EVAL_INVOKE|TCL_EVAL_REDIRECT), NULL,INT_MIN); } unknownOrAmbiguousSubcommand: @@ -2122,8 +2122,7 @@ EnsembleUnknownCallback( */ Tcl_Preserve(ensemblePtr); - ((Interp *) interp)->evalFlags |= TCL_EVAL_REDIRECT; - result = Tcl_EvalObjv(interp, paramc, paramv, 0); + result = Tcl_EvalObjv(interp, paramc, paramv, TCL_EVAL_REDIRECT); if ((result == TCL_OK) && (ensemblePtr->flags & ENSEMBLE_DEAD)) { if (!Tcl_InterpDeleted(interp)) { Tcl_SetObjResult(interp, Tcl_NewStringObj( diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 61ad12d..30ffbb8 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -3045,8 +3045,8 @@ TEBCresume( pc += 6; TEBC_YIELD(); TclNRAddCallback(interp, TclClearRootEnsemble, NULL,NULL,NULL,NULL); - iPtr->evalFlags |= TCL_EVAL_REDIRECT; - return TclNREvalObjEx(interp, objPtr, TCL_EVAL_INVOKE, NULL, INT_MIN); + return TclNREvalObjEx(interp, objPtr, (TCL_EVAL_INVOKE|TCL_EVAL_REDIRECT), + NULL, INT_MIN); /* * ----------------------------------------------------------------- diff --git a/generic/tclInt.h b/generic/tclInt.h index 5dfc143..3fe3be5 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -2250,7 +2250,6 @@ typedef struct InterpList { #define TCL_ALLOW_EXCEPTIONS 4 #define TCL_EVAL_FILE 2 #define TCL_EVAL_CTX 8 -#define TCL_EVAL_REDIRECT 16 /* * Flag bits for Interp structures: diff --git a/generic/tclInterp.c b/generic/tclInterp.c index 0f76d28..7783c27 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -1754,7 +1754,7 @@ AliasNRCmd( int isRootEnsemble = (iPtr->ensembleRewrite.sourceObjs == NULL); Tcl_Obj *listPtr; List *listRep; - int flags = TCL_EVAL_INVOKE; + int flags = (TCL_EVAL_INVOKE|TCL_EVAL_REDIRECT); /* * Append the arguments to the command prefix and invoke the command in @@ -1800,7 +1800,6 @@ AliasNRCmd( if (isRootEnsemble) { TclDeferCallback(interp, TclClearRootEnsemble, NULL, NULL, NULL, NULL); } - iPtr->evalFlags |= TCL_EVAL_REDIRECT; return Tcl_NREvalObj(interp, listPtr, flags); } diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index d3cd3e1..48eac9e 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -1945,8 +1945,8 @@ InvokeImportedNRCmd( ImportedCmdData *dataPtr = clientData; Command *realCmdPtr = dataPtr->realCmdPtr; - ((Interp *) interp)->evalFlags |= TCL_EVAL_REDIRECT; - return Tcl_NRCmdSwap(interp, (Tcl_Command) realCmdPtr, objc, objv, 0); + return Tcl_NRCmdSwap(interp, (Tcl_Command) realCmdPtr, objc, objv, + TCL_EVAL_REDIRECT); } static int |