summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-04-14 08:47:53 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-04-14 08:47:53 (GMT)
commit7f42387e71a69b938ecd25945d10f01f6e39bcc7 (patch)
treed6de8446022309740483d0f2db7f089749623f34 /generic/tclBasic.c
parent9ffcf83c49f17eca5cd2005902d378ac59aa7adf (diff)
parentccfe3f47fd0a170a819d29e0b22bba0003546796 (diff)
downloadtcl-7f42387e71a69b938ecd25945d10f01f6e39bcc7.zip
tcl-7f42387e71a69b938ecd25945d10f01f6e39bcc7.tar.gz
tcl-7f42387e71a69b938ecd25945d10f01f6e39bcc7.tar.bz2
Merge 8.7
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r--generic/tclBasic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 612a6d8..833101c 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -3513,6 +3513,8 @@ Tcl_DeleteCommandFromToken(
if (cmdPtr->tracePtr != NULL) {
CommandTrace *tracePtr;
+ /* Note that CallCommandTraces() never frees cmdPtr, that's
+ * done just before Tcl_DeleteCommandFromToken() returns */
CallCommandTraces(iPtr,cmdPtr,NULL,NULL,TCL_TRACE_DELETE);
/*
@@ -3682,7 +3684,6 @@ CallCommandTraces(
}
}
cmdPtr->flags |= CMD_TRACE_ACTIVE;
- cmdPtr->refCount++;
result = NULL;
active.nextPtr = iPtr->activeCmdTracePtr;
@@ -3740,7 +3741,6 @@ CallCommandTraces(
*/
cmdPtr->flags &= ~CMD_TRACE_ACTIVE;
- cmdPtr->refCount--;
iPtr->activeCmdTracePtr = active.nextPtr;
Tcl_Release(iPtr);
return result;