summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;