summaryrefslogtreecommitdiffstats
path: root/generic/tclCompCmds.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2014-12-22 20:13:29 (GMT)
committerdgp <dgp@users.sourceforge.net>2014-12-22 20:13:29 (GMT)
commita11afffa9f17e5c95a97d579ce36b386363c0133 (patch)
tree7735487e833e3a6f0fd44a07708d8677bef07881 /generic/tclCompCmds.c
parente3e2ea19a40931da26882d9bbc7ff94a2cc001c9 (diff)
downloadtcl-a11afffa9f17e5c95a97d579ce36b386363c0133.zip
tcl-a11afffa9f17e5c95a97d579ce36b386363c0133.tar.gz
tcl-a11afffa9f17e5c95a97d579ce36b386363c0133.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/tclCompCmds.c')
-rw-r--r--generic/tclCompCmds.c6
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.
*/