diff options
author | ericm <ericm> | 2000-08-25 20:39:31 (GMT) |
---|---|---|
committer | ericm <ericm> | 2000-08-25 20:39:31 (GMT) |
commit | f97152e392c85c9bd4b78be2bb666328b7044928 (patch) | |
tree | c69a36203d04a0e5c5ed4330b83a25a757695724 /generic | |
parent | da5194713b3c8a85943b8b731534a32a398981a9 (diff) | |
download | tcl-f97152e392c85c9bd4b78be2bb666328b7044928.zip tcl-f97152e392c85c9bd4b78be2bb666328b7044928.tar.gz tcl-f97152e392c85c9bd4b78be2bb666328b7044928.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.
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)); |