Artifacts Associated With Ticket 2017905
Ticket change [6a9428e618] (rid 128181) by nicolascastagne on 2008-07-14 11:42:13:
- assignee initialized to: "dgp"
- cmimetype initialized to: "text/plain"
- 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. - foundin initialized to: "None"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nicolascastagne"
- subsystem initialized to: "39. Package Manager"
- title initialized to: "Tcl_PackageInitProc could accept some user data"
- type initialized to: "RFE"
Ticket change [d0168fc22c] (rid 113105) by nicolascastagne on 2008-07-14 21:20:27:
- 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.
- login: "nicolascastagne"
- mimetype: "text/plain"
- username: "nicolascastagne"
- icomment:
Ticket change [02f145be05] (rid 119738) by dgp on 2008-07-14 22:13:34:
- 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.
- login: "dgp"
- mimetype: "text/plain"
- priority changed to: "3 Low"
- username: "dgp"
- icomment:
Ticket change [732bc6c0f3] (rid 104997) by dgp on 2008-07-14 22:13:55:
- subsystem changed to: "40. Dynamic Loading"