Overview
| Artifact ID: | 2194ab30f077fbc5855f003a2ebaf6d1ad5bc534 |
|---|---|
| Ticket: | 2997642fffffffffffffffffffffffffffffffff
many type casts needed when using Tcl_Pkg* API |
| User & Date: | nijtmans on 2010-05-06 14:37:11 |
Changes
- assignee changed to: "nijtmans"
- cmimetype changed to: "text/plain"
- comment changed to:
Since Tcl 8.6, all stub pointers became "const". The Tcl_Pkg* functions have a ClientData parameter for registering them. Because this parameter is not const, it means that in tclBasic.c, tclTomMathInterface.c, tclStubLib.c, and tclTomMathStubLib.c type casts need to be used in order to silence the compiler warning. There must be a better way. Therefore, I suggest to change the API of the following 4 functions: Tcl_PkgProvideEx Tcl_PkgRequireEx Tcl_PkgPresentEx Tcl_PkgRequireProc so that they can be used without type casts in this situation. Attached patch shows how to do that. This is 100% source and binary compatible. The real changes are only in tcl.decls (and the generate tclDecls.h) and tclPkg.c. The other files don't need to be modified, but are just a demonstration how they can be cleaned up without type casts after the signature change. doc update is in the patch as well. - foundin changed to: "None"
- is_private changed to: "0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nijtmans"
- subsystem changed to: "39. Package Manager"
- title changed to: "many type casts needed when using Tcl_Pkg* API"
- type changed to: "Patch"