diff options
author | stanton <stanton> | 1999-08-12 23:14:42 (GMT) |
---|---|---|
committer | stanton <stanton> | 1999-08-12 23:14:42 (GMT) |
commit | 42028a159e0769f6f16e2059c089cb553c533fea (patch) | |
tree | ead4cd3029e804dc685aeb23e438c49f1f2be9d0 /generic | |
parent | 1b63b4ff82fa2f32293e2d4b58c32f932ad6a4c4 (diff) | |
download | tcl-42028a159e0769f6f16e2059c089cb553c533fea.zip tcl-42028a159e0769f6f16e2059c089cb553c533fea.tar.gz tcl-42028a159e0769f6f16e2059c089cb553c533fea.tar.bz2 |
* win/Makefile.in: Added COMPILE_DEBUG_FLAGS macro to make it
easier to turn on compiler tracing.
* tests/parse.test:
* generic/tclParse.c: Fixed bug in Tcl_EvalEx where the termOffset
was not being updated in cases where the evaluation returned a non
TCL_OK error code. [Bug: 2535]
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclParse.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/generic/tclParse.c b/generic/tclParse.c index cef7d66..56b0a05 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.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: tclParse.c,v 1.11 1999/07/30 22:19:20 hobbs Exp $ + * RCS: @(#) $Id: tclParse.c,v 1.12 1999/08/12 23:14:42 stanton Exp $ */ #include "tclInt.h" @@ -1456,7 +1456,19 @@ Tcl_EvalEx(interp, script, numBytes, flags) Tcl_DecrRefCount(objv[i]); } if (gotParse) { + p = parse.commandStart + parse.commandSize; Tcl_FreeParse(&parse); + if ((nested != 0) && (p > script) && (p[-1] == ']')) { + /* + * We get here in the special case where the TCL_BRACKET_TERM + * flag was set in the interpreter and we reached a close + * bracket in the script. Return immediately. + */ + + iPtr->termOffset = (p - 1) - script; + } else { + iPtr->termOffset = p - script; + } } if (objv != staticObjArray) { ckfree((char *) objv); |