Skip to content
Tcl Source Code History Of Ticket 2017905
Login

History Of Ticket 2017905

Artifacts Associated With Ticket 2017905

  1. Ticket change [6a9428e618] (rid 128181) by nicolascastagne on 2008-07-14 11:42:13:

    1. assignee initialized to: "dgp"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized 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 initialized to: "None"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "nicolascastagne"
    10. subsystem initialized to: "39. Package Manager"
    11. title initialized to: "Tcl_PackageInitProc could accept some user data"
    12. type initialized to: "RFE"
  2. Ticket change [d0168fc22c] (rid 113105) by nicolascastagne on 2008-07-14 21:20:27:

    1. icomment:
      Logged In: YES 
      user_id=1258423
      Originator: YES
      
      Indeed, I've been told that the use of :
         Tcl_SetAssocData(interp, key, ClientData)
         Tcl_GetAssocData(interp, key)
      
      allow retrieving ClientData from within Tcl_PackageInitProc callback of Tcl_StaticPackage.
      
      However, I still think adding a ClientData to the Tcl_PackageInitProc would be useful for static packages.
      
      Or adding a note on "Tcl_SetAssocData" in the documentation of Tcl_StaticPackage would be OK and pbly sufficient.
      
      
    2. login: "nicolascastagne"
    3. mimetype: "text/plain"
    4. username: "nicolascastagne"
  3. Ticket change [02f145be05] (rid 119738) by dgp on 2008-07-14 22:13:34:

    1. icomment:
      Logged In: YES 
      user_id=80530
      Originator: NO
      
      
      Note that the Tcl_PackageInitProc is the
      typedef for the callback used to initialize
      all extensions.  Any change to that is going
      to impact every extension in a radical way.
      I think we need a really compelling justification
      as well as a major release of Tcl to imagine
      doing that.
      
      For now, Tcl_SetAssocData() seems to offer
      a 'workaround' for the use case in mind, so
      dropping priority on this.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. priority changed to: "3 Low"
    5. username: "dgp"
  4. Ticket change [732bc6c0f3] (rid 104997) by dgp on 2008-07-14 22:13:55:

    1. subsystem changed to: "40. Dynamic Loading"