Skip to content
Tcl Source Code History Of Ticket 36ec49db6abc3b1a
Login

History Of Ticket 36ec49db6abc3b1a

Artifacts Associated With Ticket 36ec49db6abc3b1a

  1. Ticket change [72332fc8e2] (rid 203591) by anonymous on 2022-08-31 23:43:58:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. comment initialized to:
      the manpage for Tcl_TraceVar describes Tcl_VarTraceProc as having the following
      struct signature:
      
                    typedef char *Tcl_VarTraceProc(
                            ClientData clientData,
                            Tcl_Interp *interp,
                            char *name1,
                            char *name2,
                            int flags);
      
      But name1 and name2 should have the `const` qualifier according to tcl.h:
      
      typedef char * (Tcl_VarTraceProc) (ClientData clientData, Tcl_Interp *interp,
        CONST84 char *part1, CONST84 char *part2, int flags);
      
      I found this by accident trying to compile a little sample from Ousterhout's
      book using Tcl_TraceVar in chapter 34, gcc complained about incompatible pointer
      type (for the callback) until I added `const` to both args in the function
      prototype for the callback supplied to Tcl_TraceVar.
      
      So, just add the missing `const` to both char * fields in this manpage (and
      others, if applicable).
      
      I noticed that (my pdf version of) Ousterhout's book in several places uses
      plain `char *` where `const char*` should be used, perhaps this is because at
      some point there was a migration to enforce constness and documentation wasn't
      fully updated to reflect the change (I'm just guessing here).
      
    5. foundin initialized to: "8.6"
    6. is_private initialized to: "0"
    7. login: "anonymous"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "27aa8ee3249fdc446e4e83e0911e0b4bd4f967b6"
    10. resolution initialized to: "None"
    11. severity initialized to: "Minor"
    12. status initialized to: "Open"
    13. submitter initialized to: "anonymous"
    14. subsystem initialized to: "None"
    15. title initialized to:
      Tcl_TraceVar manpage : missing `const` on char* fields
      
    16. type initialized to: "Bug"
  2. Ticket change [9f8b6cff5d] (rid 203642) by jan.nijtmans on 2022-09-02 13:49:16:

    1. assignee changed to: "jan.nijtmans"
    2. closedate changed to: "2459825.07588019"
    3. closer changed to: "jan.nijtmans"
    4. icomment:
      Fixed [8d6764bee8a12d13|here]
      
      Thanks for the report!
      
    5. login: "jan.nijtmans"
    6. mimetype: "text/x-fossil-wiki"
    7. resolution changed to: "Fixed"
    8. status changed to: "Closed"