summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorericm <ericm>2000-07-25 22:41:05 (GMT)
committerericm <ericm>2000-07-25 22:41:05 (GMT)
commitd54caded28afa2e06fa33552bc0dbe15e7a85689 (patch)
tree0e0438578bff3e94e32c45079f88b3eb84ee81c3
parent4c98c418aec2da287ac86241a067c31770a1f176 (diff)
downloadtcl-d54caded28afa2e06fa33552bc0dbe15e7a85689.zip
tcl-d54caded28afa2e06fa33552bc0dbe15e7a85689.tar.gz
tcl-d54caded28afa2e06fa33552bc0dbe15e7a85689.tar.bz2
* generic/tclVar.c (CallTraces): Added check for VAR_TRACE_ACTIVE
on the array containing the variable before executing traces on that array, to conform with normal variable traces and the documentation, which states that while executing a trace, other traces on that variable are disabled. [Bug: 6049].
-rw-r--r--ChangeLog6
-rw-r--r--generic/tclVar.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 58697f3..46b1707 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2000-07-25 Eric Melski <ericm@ajubasolutions.com>
+ * generic/tclVar.c (CallTraces): Added check for VAR_TRACE_ACTIVE
+ on the array containing the variable before executing traces on
+ that array, to conform with normal variable traces and the
+ documentation, which states that while executing a trace, other
+ traces on that variable are disabled. [Bug: 6049].
+
* win/tclWinPipe.c (BuildCommandLine): Added Tcl_DStringFree call
to prevent potential memory leaks [Bug: 6041].
diff --git a/generic/tclVar.c b/generic/tclVar.c
index 8147f45..8990ab8 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.19 2000/06/01 00:33:27 hobbs Exp $
+ * RCS: @(#) $Id: tclVar.c,v 1.20 2000/07/25 22:41:05 ericm Exp $
*/
#include "tclInt.h"
@@ -4190,7 +4190,7 @@ CallTraces(iPtr, arrayPtr, varPtr, part1, part2, flags)
result = NULL;
active.nextPtr = iPtr->activeTracePtr;
iPtr->activeTracePtr = &active;
- if (arrayPtr != NULL) {
+ if (arrayPtr != NULL && !(arrayPtr->flags & VAR_TRACE_ACTIVE)) {
arrayPtr->refCount++;
active.varPtr = arrayPtr;
for (tracePtr = arrayPtr->tracePtr; tracePtr != NULL;