summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-09-19 16:04:48 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-09-19 16:04:48 (GMT)
commit24402310629e95ecb27a71505de4c3a5baa70c00 (patch)
tree4aa82f0d14232add9bf751bc1058de6d4683f843 /generic
parentaed9fbb19c01b6aed6fc21b3ea96d445bab28f80 (diff)
downloadtcl-24402310629e95ecb27a71505de4c3a5baa70c00.zip
tcl-24402310629e95ecb27a71505de4c3a5baa70c00.tar.gz
tcl-24402310629e95ecb27a71505de4c3a5baa70c00.tar.bz2
Line numbers wrong in compiled [namespace upvar].
Diffstat (limited to 'generic')
-rw-r--r--generic/tclCompCmds.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c
index 6189b29..8e26a30 100644
--- a/generic/tclCompCmds.c
+++ b/generic/tclCompCmds.c
@@ -5920,7 +5920,7 @@ TclCompileNamespaceCmd(
*/
tokenPtr = TokenAfter(tokenPtr);
- CompileWord(envPtr, tokenPtr, interp, 1);
+ CompileWord(envPtr, tokenPtr, interp, 2);
/*
* Loop over the (otherVar, thisVar) pairs. If any of the thisVar is not a
@@ -5929,13 +5929,13 @@ TclCompileNamespaceCmd(
*/
localTokenPtr = tokenPtr;
- for(i=4; i<=numWords; i+=2) {
+ for(i=3; i<numWords; i+=2) {
otherTokenPtr = TokenAfter(localTokenPtr);
localTokenPtr = TokenAfter(otherTokenPtr);
- CompileWord(envPtr, otherTokenPtr, interp, 1);
+ CompileWord(envPtr, otherTokenPtr, interp, i);
PushVarNameWord(interp, localTokenPtr, envPtr, TCL_CREATE_VAR,
- &localIndex, &simpleVarName, &isScalar, 1);
+ &localIndex, &simpleVarName, &isScalar, i+1);
if((localIndex < 0) || !isScalar) {
return TCL_ERROR;