diff options
author | stanton <stanton> | 1998-11-06 21:51:57 (GMT) |
---|---|---|
committer | stanton <stanton> | 1998-11-06 21:51:57 (GMT) |
commit | b17ee109b95c8282717d13c89e5d630ed6982d96 (patch) | |
tree | e7649949a25804e0a82c0c5c5df9e8e2d175a9be | |
parent | 8ce87de919903f147b6cc95185b4b51e93e75da6 (diff) | |
download | tcl-b17ee109b95c8282717d13c89e5d630ed6982d96.zip tcl-b17ee109b95c8282717d13c89e5d630ed6982d96.tar.gz tcl-b17ee109b95c8282717d13c89e5d630ed6982d96.tar.bz2 |
* tclVar.c (TclGetIndexedScalar): Fixed bug 796, var name was
getting lost before being passed to CallTraces.
-rw-r--r-- | generic/tclVar.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/generic/tclVar.c b/generic/tclVar.c index c4cc847..12adf5e 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -13,7 +13,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.1.2.2 1998/09/24 23:59:04 stanton Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.1.2.3 1998/11/06 21:51:57 stanton Exp $ */ #include "tclInt.h" @@ -641,6 +641,7 @@ TclGetIndexedScalar(interp, localIndex, leaveErrorMsg) Var *compiledLocals = varFramePtr->compiledLocals; register Var *varPtr; /* Points to the variable's in-frame Var * structure. */ + char *varName; /* Name of the local variable. */ char *msg; #ifdef TCL_COMPILE_DEBUG @@ -660,6 +661,7 @@ TclGetIndexedScalar(interp, localIndex, leaveErrorMsg) #endif /* TCL_COMPILE_DEBUG */ varPtr = &(compiledLocals[localIndex]); + varName = varPtr->name; /* * If varPtr is a link variable, we have a reference to some variable @@ -677,11 +679,11 @@ TclGetIndexedScalar(interp, localIndex, leaveErrorMsg) */ if (varPtr->tracePtr != NULL) { - msg = CallTraces(iPtr, /*arrayPtr*/ NULL, varPtr, varPtr->name, - NULL, TCL_TRACE_READS); + msg = CallTraces(iPtr, /*arrayPtr*/ NULL, varPtr, varName, NULL, + TCL_TRACE_READS); if (msg != NULL) { if (leaveErrorMsg) { - VarErrMsg(interp, varPtr->name, NULL, "read", msg); + VarErrMsg(interp, varName, NULL, "read", msg); } return NULL; } @@ -699,7 +701,7 @@ TclGetIndexedScalar(interp, localIndex, leaveErrorMsg) } else { msg = noSuchVar; } - VarErrMsg(interp, varPtr->name, NULL, "read", msg); + VarErrMsg(interp, varName, NULL, "read", msg); } return NULL; |