diff options
author | hobbs <hobbs> | 1999-08-19 02:59:08 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 1999-08-19 02:59:08 (GMT) |
commit | 92e37b2bd18d8a5451699c466c1664e53403da57 (patch) | |
tree | 4ca4faf0835ac78d536738f2e313561972b933c0 /generic/tclCompile.c | |
parent | 5e5c7d8418d3fbd50e237bc02c7c8d65618f5235 (diff) | |
download | tcl-92e37b2bd18d8a5451699c466c1664e53403da57.zip tcl-92e37b2bd18d8a5451699c466c1664e53403da57.tar.gz tcl-92e37b2bd18d8a5451699c466c1664e53403da57.tar.bz2 |
1999-08-18 Jeff Hobbs <hobbs@scriptics.com>
* doc/OpenFileChnl.3:
* doc/file.n:
* tests/cmdAH.test:
* tclIO.c:
* tclCmdAH.c: added "file channels ?pattern?" tcl command, with
associated Tcl_GetChannelNames and Tcl_GetChannelNamesEx public
C APIs (added to tcl.decls as well), with docs and tests.
* generic/tclCompile.c: add TCL_TOKEN_VARIABLE to the part types
that cause differed compilation for exprs, to correct the expr
double-evaluation problem for vars. Added test cases.
Diffstat (limited to 'generic/tclCompile.c')
-rw-r--r-- | generic/tclCompile.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c index 25803a0..d83a9c1 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.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. * - * RCS: @(#) $Id: tclCompile.c,v 1.15 1999/04/22 22:57:06 stanton Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.16 1999/08/19 02:59:09 hobbs Exp $ */ #include "tclInt.h" @@ -1348,7 +1348,7 @@ TclCompileExprWords(interp, tokenPtr, numWords, envPtr) JumpFixup jumpFixup; int maxDepth, doExprInline, range, numBytes, i, j, code; char *script; - char saveChar; + char savedChar; int saveExprIsJustVarRef = envPtr->exprIsJustVarRef; int saveExprIsComparison = envPtr->exprIsComparison; @@ -1370,10 +1370,10 @@ TclCompileExprWords(interp, tokenPtr, numWords, envPtr) script = tokenPtr[1].start; numBytes = tokenPtr[1].size; - saveChar = script[numBytes]; + savedChar = script[numBytes]; script[numBytes] = 0; code = TclCompileExpr(interp, script, numBytes, envPtr); - script[numBytes] = saveChar; + script[numBytes] = savedChar; return code; } @@ -1393,7 +1393,8 @@ TclCompileExprWords(interp, tokenPtr, numWords, envPtr) for (j = 0, partPtr = wordPtr+1; j < wordPtr->numComponents; j++, partPtr++) { if ((partPtr->type == TCL_TOKEN_BS) - || (partPtr->type == TCL_TOKEN_COMMAND)) { + || (partPtr->type == TCL_TOKEN_COMMAND) + || (partPtr->type == TCL_TOKEN_VARIABLE)) { doExprInline = 0; break; } |