Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

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

  1. assignee changed to: "nijtmans"
  2. cmimetype changed to: "text/plain"
  3. 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.
    
  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: "nijtmans"
  10. subsystem changed to: "39. Package Manager"
  11. title changed to: "many type casts needed when using Tcl_Pkg* API"
  12. type changed to: "Patch"