summaryrefslogtreecommitdiffstats
path: root/generic/tclVar.c
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2007-04-03 01:34:35 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2007-04-03 01:34:35 (GMT)
commit8cfd70638999b67e37edba6967467a2ece7a91fe (patch)
tree9800be2d600ba1c88b6e67f0e8a1b46a08f32b64 /generic/tclVar.c
parentfa49c9af9b48554cf441f2554c9cd58d3ca1f267 (diff)
downloadtcl-8cfd70638999b67e37edba6967467a2ece7a91fe.zip
tcl-8cfd70638999b67e37edba6967467a2ece7a91fe.tar.gz
tcl-8cfd70638999b67e37edba6967467a2ece7a91fe.tar.bz2
* generic/tclBasic.c: Added bytecode compilers for the
* generic/tclCompCmds.c: variable linking commands: 'global', * generic/tclCompile.h: 'variable', 'upvar', 'namespace upvar' * generic/tclExecute.c: [Patch 1688593] * generic/tclInt.h: * generic/tclVar.c:
Diffstat (limited to 'generic/tclVar.c')
-rw-r--r--generic/tclVar.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/generic/tclVar.c b/generic/tclVar.c
index 17b859c..c723e84 100644
--- a/generic/tclVar.c
+++ b/generic/tclVar.c
@@ -15,7 +15,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclVar.c,v 1.128 2007/03/12 18:06:14 dgp Exp $
+ * RCS: @(#) $Id: tclVar.c,v 1.129 2007/04/03 01:34:39 msofer Exp $
*/
#include "tclInt.h"
@@ -3243,7 +3243,7 @@ ObjMakeUpvar(
*/
if (index < 0) {
- if (((otherP2 ? arrayPtr->nsPtr : otherPtr->nsPtr) == NULL)
+ if (((arrayPtr ? arrayPtr->nsPtr : otherPtr->nsPtr) == NULL)
&& ((myFlags & (TCL_GLOBAL_ONLY | TCL_NAMESPACE_ONLY))
|| (varFramePtr == NULL)
|| !HasLocalVars(varFramePtr)
@@ -3301,6 +3301,7 @@ TclPtrMakeUpvar(
Tcl_Panic("ObjMakeUpvar called with an index outside from a proc");
}
varPtr = &(varFramePtr->compiledLocals[index]);
+ myName = varPtr->name;
} else {
/*
* Do not permit the new variable to look like an array reference, as