Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 6a9428e618494fd6dc1725fc0086902d79b55b41
Ticket: 2017905fffffffffffffffffffffffffffffffff
Tcl_PackageInitProc could accept some user data
User & Date: nicolascastagne on 2008-07-14 11:42:13
Changes

  1. assignee changed to: "dgp"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    I've come to think that the handler 
    
       typedef int Tcl_PackageInitProc(
                     Tcl_Interp *interp);
    
    which is passed to :
       Tcl_StaticPackage(interp, 
                         pkgName, 
                         initProc, 
                         safeInitProc)
    
    would benefit accepting some user data.
    
    I hence suggest to change add an API to Tcl_StaticPackage and its package-init handler :
    hence change its API to :
       Tcl_StaticPackage(interp, 
                         pkgName, 
                         initProc, 
                         safeInitProc,
                         ClientData clientData)
    and :
       typedef int Tcl_PackageInitProc(
                     Tcl_Interp *interp,  
                     ClientData clientData);
    
    At least, this would have been usefull to me, since my package's commands use a specific client data.
    
    With the current API, I need to do some "equilibrist work" to retrieve the CLientData I pass to Tcl_CreateCommand.
    
    Hope this helps !
    Nicolas
    
    PS : I may be wrong in the "Category". Sorry in this case.
    
    
    
  4. foundin changed to: "None"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "nicolascastagne"
  10. subsystem changed to: "39. Package Manager"
  11. title changed to: "Tcl_PackageInitProc could accept some user data"
  12. type changed to: "RFE"