summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/tclTrace.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/generic/tclTrace.c b/generic/tclTrace.c
index f1cc505..3ea182f 100644
--- a/generic/tclTrace.c
+++ b/generic/tclTrace.c
@@ -1122,16 +1122,15 @@ Tcl_TraceCommand(
tracePtr->refCount = 1;
cmdPtr->tracePtr = tracePtr;
if (tracePtr->flags & TCL_TRACE_ANY_EXEC) {
- cmdPtr->flags |= CMD_HAS_EXEC_TRACES;
-
/*
* Bug 3484621: up the interp's epoch if this is a BC'ed command
*/
- if (cmdPtr->compileProc != NULL) {
+ if ((cmdPtr->compileProc != NULL) && !(cmdPtr->flags & CMD_HAS_EXEC_TRACES)){
Interp *iPtr = (Interp *) interp;
iPtr->compileEpoch++;
}
+ cmdPtr->flags |= CMD_HAS_EXEC_TRACES;
}