diff options
| author | dgp@users.sourceforge.net <dgp> | 2002-04-05 19:26:34 (GMT) |
|---|---|---|
| committer | dgp@users.sourceforge.net <dgp> | 2002-04-05 19:26:34 (GMT) |
| commit | 8fbea0d31c07f78ae8e4bdc1ca7979960730e84e (patch) | |
| tree | d3e09b315235fa448b73c898e119e8b389ae0325 /generic/tclCmdMZ.c | |
| parent | 835c76fd0fc0acd9bc2a49be9b48c6b44b8c455f (diff) | |
| download | tcl-8fbea0d31c07f78ae8e4bdc1ca7979960730e84e.zip tcl-8fbea0d31c07f78ae8e4bdc1ca7979960730e84e.tar.gz tcl-8fbea0d31c07f78ae8e4bdc1ca7979960730e84e.tar.bz2 | |
* Corrected [subst] so that return codes
TCL_BREAK and TCL_CONTINUE returned by variable substitution
have the same effect as when those codes are returned by command
substitution. [Bug 536879]
Diffstat (limited to 'generic/tclCmdMZ.c')
| -rw-r--r-- | generic/tclCmdMZ.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 0721ac0..63da4d3 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.65 2002/03/29 22:47:23 hobbs Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.66 2002/04/05 19:26:35 dgp Exp $ */ #include "tclInt.h" @@ -2525,10 +2525,16 @@ Tcl_SubstObj(interp, objPtr, flags) p += parse.tokenPtr->size; code = Tcl_EvalTokensStandard(interp, parse.tokenPtr, parse.numTokens); - if (code != TCL_OK) { + if (code == TCL_ERROR) { goto errorResult; } - Tcl_AppendObjToObj(resultObj, Tcl_GetObjResult(interp)); + if (code == TCL_BREAK) { + Tcl_ResetResult(interp); + return resultObj; + } + if (code != TCL_CONTINUE) { + Tcl_AppendObjToObj(resultObj, Tcl_GetObjResult(interp)); + } Tcl_ResetResult(interp); old = p; } else { |
