summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2002-03-25 16:35:13 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2002-03-25 16:35:13 (GMT)
commitbcd3c2b029233968c21c526097f241bc4738e9fd (patch)
tree72400edb0dcf512eb6c326993743cac44c5db52e
parent7bcede4e2dce9129177513d583c790d72b388988 (diff)
downloadtcl-bcd3c2b029233968c21c526097f241bc4738e9fd.zip
tcl-bcd3c2b029233968c21c526097f241bc4738e9fd.tar.gz
tcl-bcd3c2b029233968c21c526097f241bc4738e9fd.tar.bz2
Allow NULL callback on trace deletions [Bug 534728]
-rw-r--r--ChangeLog6
-rw-r--r--doc/CrtTrace.34
-rw-r--r--generic/tclBasic.c6
3 files changed, 12 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 41bcfb0..1013b3f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2002-03-25 Miguel Sofer <msofer@users.sourceforge.net>
+
+ * doc/CrtTrace.3: small doc correction
+ * generic/tclBasic.c (Tcl_DeleteTrace): Allow NULL callback on
+ trace deletions [Bug 534728] (Hemang Lavana).
+
2002-03-24 Miguel Sofer <msofer@users.sourceforge.net>
* generic/tclBasic.c (Tcl_EvalObjv): replaced obscure, incorrect
diff --git a/doc/CrtTrace.3 b/doc/CrtTrace.3
index 0b10d98..164ffad 100644
--- a/doc/CrtTrace.3
+++ b/doc/CrtTrace.3
@@ -6,7 +6,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: CrtTrace.3,v 1.3 2002/02/10 20:36:33 kennykb Exp $
+'\" RCS: @(#) $Id: CrtTrace.3,v 1.4 2002/03/25 16:35:14 msofer Exp $
'\"
.so man.macros
.TH Tcl_CreateTrace 3 "" Tcl "Tcl Library Procedures"
@@ -35,7 +35,7 @@ invoked as immediate consequences of executing top-level commands
(procedure bodies, bracketed commands, etc.) and so on.
.AP int flags in
Flags governing the trace execution. See below for details.
-.AP Tcl_CmdObjTraceProc *proc in
+.AP Tcl_CmdObjTraceProc *objProc in
Procedure to call for each command that's executed. See below for
details of the calling sequence.
.AP Tcl_CmdTraceProc *proc in
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 1e9ea32..3f4c5d6 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclBasic.c,v 1.52 2002/03/24 19:05:46 msofer Exp $
+ * RCS: @(#) $Id: tclBasic.c,v 1.53 2002/03/25 16:35:14 msofer Exp $
*/
#include "tclInt.h"
@@ -4963,7 +4963,9 @@ Tcl_DeleteTrace(interp, trace)
* Execute any delete callback.
*/
- ( tracePtr->delProc )( tracePtr->clientData );
+ if ( tracePtr->delProc != NULL ) {
+ ( tracePtr->delProc )( tracePtr->clientData );
+ }
/* Delete the trace object */