diff options
author | dgp <dgp@users.sourceforge.net> | 2014-12-05 21:28:00 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2014-12-05 21:28:00 (GMT) |
commit | efceec946be8872457431044b999386f58a44581 (patch) | |
tree | 872dd8a9389cf8e0d6385601d9eb628a46d7d358 /generic | |
parent | 71a48e59c2eb9d90233530198576fc445abfda42 (diff) | |
parent | 9bc29d1afe15b7443e80d244c358d0c77ccab126 (diff) | |
download | tcl-efceec946be8872457431044b999386f58a44581.zip tcl-efceec946be8872457431044b999386f58a44581.tar.gz tcl-efceec946be8872457431044b999386f58a44581.tar.bz2 |
Ever since (Tcl)PushVarName() stopped making a recursive call to Tcl_ParseCommand() (in the pre-8.4.0 timeframe), there's been no need for special protections for brace-quoted varname words. A simple word is a simple word is a simple word.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclCompCmds.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index 4e7ef97..30c1318 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -3289,16 +3289,7 @@ TclPushVarName( nameChars = elNameChars = 0; localIndex = -1; - /* - * Check not only that the type is TCL_TOKEN_SIMPLE_WORD, but whether - * curly braces surround the variable name. This really matters for array - * elements to handle things like - * set {x($foo)} 5 - * which raises an undefined var error if we are not careful here. - */ - - if ((varTokenPtr->type == TCL_TOKEN_SIMPLE_WORD) && - (varTokenPtr->start[0] != '{')) { + if (varTokenPtr->type == TCL_TOKEN_SIMPLE_WORD) { /* * A simple variable name. Divide it up into "name" and "elName" * strings. If it is not a local variable, look it up at runtime. |