From bcd3c2b029233968c21c526097f241bc4738e9fd Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Mon, 25 Mar 2002 16:35:13 +0000 Subject: Allow NULL callback on trace deletions [Bug 534728] --- ChangeLog | 6 ++++++ doc/CrtTrace.3 | 4 ++-- generic/tclBasic.c | 6 ++++-- 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 + + * 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 * 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 */ -- cgit v0.12