summaryrefslogtreecommitdiffstats
path: root/generic/tclCompCmds.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2014-12-05 21:05:17 (GMT)
committerdgp <dgp@users.sourceforge.net>2014-12-05 21:05:17 (GMT)
commitb52476a5cdc6924d597f7bc9dbd89f0717058009 (patch)
tree0c1b068d127bb1118c061a3cc6f9286d48fd1498 /generic/tclCompCmds.c
parentbfb321eb38ad0ef45285f0637c865cf701949b90 (diff)
downloadtcl-b52476a5cdc6924d597f7bc9dbd89f0717058009.zip
tcl-b52476a5cdc6924d597f7bc9dbd89f0717058009.tar.gz
tcl-b52476a5cdc6924d597f7bc9dbd89f0717058009.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/tclCompCmds.c')
-rw-r--r--generic/tclCompCmds.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c
index 2f72263..c8ca828 100644
--- a/generic/tclCompCmds.c
+++ b/generic/tclCompCmds.c
@@ -4890,16 +4890,7 @@ PushVarName(
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.