summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2000-11-15 14:09:00 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2000-11-15 14:09:00 (GMT)
commit370ea643fda494a0ab9ce121a7059c18d2605045 (patch)
treef1e411e8667842d1854844c456677b7649c537e0
parent18a35066c7ec92ae68d60521941dce5d15ebb317 (diff)
downloadtcl-370ea643fda494a0ab9ce121a7059c18d2605045.zip
tcl-370ea643fda494a0ab9ce121a7059c18d2605045.tar.gz
tcl-370ea643fda494a0ab9ce121a7059c18d2605045.tar.bz2
Fixed bug 119192 which was causing variable names to be reported
incorrectly in some circumstances.
-rw-r--r--ChangeLog6
-rw-r--r--generic/tclVar.c18
2 files changed, 15 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 895aee2..1365974 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2000-11-15 Donal K. Fellows <fellowsd@cs.man.ac.uk>
+
+ * generic/tclVar.c (TclLookupVar): Changed references to part2 to
+ use elName instead in various error message generating spots, so
+ as to fix Bug-119192.
+
2000-11-03 David Gravereaux <davygrvy@ajubasolutions.com>
* win/.cvsignore: Removed 'configure' from the glob list now
diff --git a/generic/tclVar.c b/generic/tclVar.c
index 53a8f6c..feb319d 100644
--- a/generic/tclVar.c
+++ b/generic/tclVar.c
@@ -14,7 +14,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.24 2000/11/01 21:48:45 hobbs Exp $
+ * RCS: @(#) $Id: tclVar.c,v 1.25 2000/11/15 14:09:01 dkf Exp $
*/
#include "tclInt.h"
@@ -262,13 +262,13 @@ TclLookupVar(interp, part1, part2, flags, msg, createPart1, createPart2,
if (varNsPtr == NULL) {
if (flags & TCL_LEAVE_ERR_MSG) {
- VarErrMsg(interp, part1, part2, msg, badNamespace);
+ VarErrMsg(interp, part1, elName, msg, badNamespace);
}
goto done;
}
if (tail == NULL) {
if (flags & TCL_LEAVE_ERR_MSG) {
- VarErrMsg(interp, part1, part2, msg, missingName);
+ VarErrMsg(interp, part1, elName, msg, missingName);
}
goto done;
}
@@ -279,7 +279,7 @@ TclLookupVar(interp, part1, part2, flags, msg, createPart1, createPart2,
varPtr->nsPtr = varNsPtr;
} else { /* var wasn't found and not to create it */
if (flags & TCL_LEAVE_ERR_MSG) {
- VarErrMsg(interp, part1, part2, msg, noSuchVar);
+ VarErrMsg(interp, part1, elName, msg, noSuchVar);
}
goto done;
}
@@ -329,7 +329,7 @@ TclLookupVar(interp, part1, part2, flags, msg, createPart1, createPart2,
}
if (hPtr == NULL) {
if (flags & TCL_LEAVE_ERR_MSG) {
- VarErrMsg(interp, part1, part2, msg, noSuchVar);
+ VarErrMsg(interp, part1, elName, msg, noSuchVar);
}
goto done;
}
@@ -370,7 +370,7 @@ TclLookupVar(interp, part1, part2, flags, msg, createPart1, createPart2,
if (TclIsVarUndefined(varPtr) && !TclIsVarArrayElement(varPtr)) {
if (!createPart1) {
if (flags & TCL_LEAVE_ERR_MSG) {
- VarErrMsg(interp, part1, part2, msg, noSuchVar);
+ VarErrMsg(interp, part1, elName, msg, noSuchVar);
}
varPtr = NULL;
goto done;
@@ -382,7 +382,7 @@ TclLookupVar(interp, part1, part2, flags, msg, createPart1, createPart2,
*/
if ((varPtr->flags & VAR_IN_HASHTABLE) && (varPtr->hPtr == NULL)) {
if (flags & TCL_LEAVE_ERR_MSG) {
- VarErrMsg(interp, part1, part2, msg, danglingVar);
+ VarErrMsg(interp, part1, elName, msg, danglingVar);
}
varPtr = NULL;
goto done;
@@ -395,7 +395,7 @@ TclLookupVar(interp, part1, part2, flags, msg, createPart1, createPart2,
Tcl_InitHashTable(varPtr->value.tablePtr, TCL_STRING_KEYS);
} else if (!TclIsVarArray(varPtr)) {
if (flags & TCL_LEAVE_ERR_MSG) {
- VarErrMsg(interp, part1, part2, msg, needArray);
+ VarErrMsg(interp, part1, elName, msg, needArray);
}
varPtr = NULL;
goto done;
@@ -426,7 +426,7 @@ TclLookupVar(interp, part1, part2, flags, msg, createPart1, createPart2,
}
if (hPtr == NULL) {
if (flags & TCL_LEAVE_ERR_MSG) {
- VarErrMsg(interp, part1, part2, msg, noSuchElement);
+ VarErrMsg(interp, part1, elName, msg, noSuchElement);
}
varPtr = NULL;
goto done;