summaryrefslogtreecommitdiffstats
path: root/generic/tclCompCmdsGR.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2014-12-23 02:41:54 (GMT)
committerdgp <dgp@users.sourceforge.net>2014-12-23 02:41:54 (GMT)
commitdd4496550090acf79f5e144602c745533549eea5 (patch)
tree09d59393ee9b150022bdc596e49b0a099ee0170e /generic/tclCompCmdsGR.c
parent81a240828fe7d60234ab063b23b1666272126fb2 (diff)
downloadtcl-dd4496550090acf79f5e144602c745533549eea5.zip
tcl-dd4496550090acf79f5e144602c745533549eea5.tar.gz
tcl-dd4496550090acf79f5e144602c745533549eea5.tar.bz2
Use more suitable variable name pushers.
Diffstat (limited to 'generic/tclCompCmdsGR.c')
-rw-r--r--generic/tclCompCmdsGR.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/generic/tclCompCmdsGR.c b/generic/tclCompCmdsGR.c
index 98407f7..e2fb43d 100644
--- a/generic/tclCompCmdsGR.c
+++ b/generic/tclCompCmdsGR.c
@@ -2044,7 +2044,7 @@ TclCompileNamespaceUpvarCmd(
CompileEnv *envPtr) /* Holds resulting instructions. */
{
Tcl_Token *tokenPtr, *otherTokenPtr, *localTokenPtr;
- int isScalar, localIndex, numWords, i;
+ int localIndex, numWords, i;
DefineLineInformation; /* TIP #280 */
if (envPtr->procPtr == NULL) {
@@ -2079,10 +2079,8 @@ TclCompileNamespaceUpvarCmd(
localTokenPtr = TokenAfter(otherTokenPtr);
CompileWord(envPtr, otherTokenPtr, interp, i);
- PushVarNameWord(interp, localTokenPtr, envPtr, 0,
- &localIndex, &isScalar, i+1);
-
- if ((localIndex < 0) || !isScalar) {
+ localIndex = LocalScalarFromToken(localTokenPtr, envPtr);
+ if (localIndex < 0) {
return TCL_ERROR;
}
TclEmitInstInt4( INST_NSUPVAR, localIndex, envPtr);
@@ -2763,7 +2761,7 @@ TclCompileUpvarCmd(
CompileEnv *envPtr) /* Holds resulting instructions. */
{
Tcl_Token *tokenPtr, *otherTokenPtr, *localTokenPtr;
- int isScalar, localIndex, numWords, i;
+ int localIndex, numWords, i;
DefineLineInformation; /* TIP #280 */
Tcl_Obj *objPtr;
@@ -2826,10 +2824,8 @@ TclCompileUpvarCmd(
localTokenPtr = TokenAfter(otherTokenPtr);
CompileWord(envPtr, otherTokenPtr, interp, i);
- PushVarNameWord(interp, localTokenPtr, envPtr, 0,
- &localIndex, &isScalar, i+1);
-
- if ((localIndex < 0) || !isScalar) {
+ localIndex = LocalScalarFromToken(localTokenPtr, envPtr);
+ if (localIndex < 0) {
return TCL_ERROR;
}
TclEmitInstInt4( INST_UPVAR, localIndex, envPtr);