diff options
author | dgp <dgp@users.sourceforge.net> | 2014-12-22 20:13:29 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2014-12-22 20:13:29 (GMT) |
commit | 7ac39417f17cf6027ca26576c86d3cf9147ad1e7 (patch) | |
tree | 7735487e833e3a6f0fd44a07708d8677bef07881 /generic | |
parent | 3faf4cc3b890c8295557932ae4d896c6624e6af7 (diff) | |
download | tcl-7ac39417f17cf6027ca26576c86d3cf9147ad1e7.zip tcl-7ac39417f17cf6027ca26576c86d3cf9147ad1e7.tar.gz tcl-7ac39417f17cf6027ca26576c86d3cf9147ad1e7.tar.bz2 |
Use (interp == NULL) argument to TclPushVarName() to signal that no compiling
is desired. Only a lookup of an index into the compiled variable table.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclCompCmds.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index ee9209a..18071b1 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -3328,7 +3328,7 @@ TclPushVarName( elemTokenCount = 1; } } - } else if (((n = varTokenPtr->numComponents) > 1) + } else if (interp && ((n = varTokenPtr->numComponents) > 1) && (varTokenPtr[1].type == TCL_TOKEN_TEXT) && (varTokenPtr[n].type == TCL_TOKEN_TEXT) && (varTokenPtr[n].start[varTokenPtr[n].size - 1] == ')')) { @@ -3429,7 +3429,7 @@ TclPushVarName( localIndex = -1; } } - if (localIndex < 0) { + if (interp && localIndex < 0) { PushLiteral(envPtr, name, nameChars); } @@ -3446,7 +3446,7 @@ TclPushVarName( PushStringLiteral(envPtr, ""); } } - } else { + } else if (interp) { /* * The var name isn't simple: compile and push it. */ |