Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 5dd9a99286b458fd8304b71f2295ffd8334e5779
Ticket: 2507159fffffffffffffffffffffffffffffffff
Tcl_Command validity management
User & Date: dgp on 2009-01-15 02:08:23
Changes

  1. icomment:
    
    One idea how callers might deal
    with the current situation.  Rather
    than directly store a Tcl_Command,
    arrange to store an unshared Tcl_Obj
    and use Tcl_GetCommandFromObj() to
    manipulate it into the "cmdName"
    Tcl_ObjType.  The intrep management
    builtin to that Tcl_ObjType will 
    take care of the Command refCounts
    to keep the struct alive.  Whenever
    the Tcl_Command value is needed,
    another call to Tcl_GetCommandFromObj()
    will fetch it.  When really done with
    the value, just Tcl_DecrRefCount to make
    the Tcl_Obj and its intrep go away.
    
    There's probably still some ugliness
    on how to handle renames.  Hmmm....
    
    
    
  2. login: "dgp"
  3. mimetype: "text/plain"
  4. username: "dgp"