Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 60f9e5d5af42234ebf94256e5a3a8ea9dc2d15e3
Ticket: 534728ffffffffffffffffffffffffffffffffff
Tcl_CreateObjTrace: allow delProc = NULL
User & Date: hemanglavana on 2002-03-25 16:06:37
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    Version: Tcl8.4a4 (CVS Head)
    
    From the man page for Tcl_CreateObjTrace:
    
    Tcl_CmdObjTraceDeleteProc *deleteProc ()
    Procedure to call when the trace is deleted. See below
    for details of the calling sequence. A null pointer is
    permissible and results in no callback when the trace
    is deleted.
    
    However, specifying deleteProc as NULL results in
    segmentation fault. The following patch fixes this problem:
    
    godel:28> cvs diff tclBasic.c 
    Index: tclBasic.c
    ===================================================================
    RCS file: /cvsroot/tcl/tcl/generic/tclBasic.c,v
    retrieving revision 1.52
    diff -r1.52 tclBasic.c
    4963c4963
    <      * Execute any delete callback.
    ---
    >      * Execute any delete callback, if not NULL.
    4966c4966,4968
    <     ( tracePtr->delProc )( tracePtr->clientData );
    ---
    >     if ( (tracePtr->delProc) != NULL) {
    >         ( tracePtr->delProc )( tracePtr->clientData );
    >     }
    
    Next, there is one documentation typo in its man page:
    
    godel:39> cvs diff CrtTrace.3
    Index: CrtTrace.3
    ===================================================================
    RCS file: /cvsroot/tcl/tcl/doc/CrtTrace.3,v
    retrieving revision 1.3
    diff -r1.3 CrtTrace.3
    38c38
    < .AP Tcl_CmdObjTraceProc *proc in
    ---
    > .AP Tcl_CmdObjTraceProc *objProc in
    
    
  4. foundin changed to: "None"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "hemanglavana"
  9. subsystem changed to: "None"
  10. title changed to: "Tcl_CreateObjTrace: allow delProc = NULL"
  11. type changed to: "Bug"