diff options
author | ericm <ericm@noemail.net> | 2000-08-25 20:39:30 (GMT) |
---|---|---|
committer | ericm <ericm@noemail.net> | 2000-08-25 20:39:30 (GMT) |
commit | 8cc98d469ab45bb891494743e6fc9e30d87d7605 (patch) | |
tree | c69a36203d04a0e5c5ed4330b83a25a757695724 /generic | |
parent | 17fc926051062200d9d08629eff21b30aa5cf137 (diff) | |
download | tcl-8cc98d469ab45bb891494743e6fc9e30d87d7605.zip tcl-8cc98d469ab45bb891494743e6fc9e30d87d7605.tar.gz tcl-8cc98d469ab45bb891494743e6fc9e30d87d7605.tar.bz2 |
* tests/trace.test: Extended array tracing tests.
* doc/trace.n: Clarified information about when array traces will
be fired.
* generic/tclVar.c (Tcl_ArrayObjCmd): Corrected call to CallTraces
(for TCL_TRACE_ARRAY) to only be called when the variable is
either an array or is undefined, to ensure that array traces do
not fire for scalar variables.
FossilOrigin-Name: 78f46f24d0b2b1dff03ef9719925cbe02a4a224c
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclVar.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/generic/tclVar.c b/generic/tclVar.c index 48fd89a..b8a0271 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.22 2000/08/25 02:04:29 ericm Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.23 2000/08/25 20:39:31 ericm Exp $ */ #include "tclInt.h" @@ -2947,7 +2947,8 @@ Tcl_ArrayObjCmd(dummy, interp, objc, objv) * array names, array get, etc. */ - if (varPtr != NULL && varPtr->tracePtr != NULL) { + if (varPtr != NULL && varPtr->tracePtr != NULL + && (TclIsVarArray(varPtr) || TclIsVarUndefined(varPtr))) { msg = CallTraces(iPtr, arrayPtr, varPtr, varName, NULL, (TCL_LEAVE_ERR_MSG|TCL_NAMESPACE_ONLY|TCL_GLOBAL_ONLY| TCL_TRACE_ARRAY)); |