Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: f612dee08aba5f5a1a3b5edbb19ca3329f4b58bd9f6f1a65ceda5598f044cc5b
Ticket: 3f9b4e0c812462ccd2a9b17bd1c13c834e811848
CrtObjCmd.3, NRE.3, SplitList.3: constify cmdName, list
User & Date: chrstphrchvz on 2021-05-24 17:14:08
Changes

  1. comment changed to:
    The functions documented in CrtObjCmd.3 and NRE.3 have expected <tt>const char *cmdName</tt> parameters for a long time (permanently as of [dc58eb7219]). Should the documentation reflect this? Maybe it was supposed to as of [94bf67038b] (as done for CrtAlias.3, CrtCommand.3, TraceCmd.3).
    
    <pre>
    --- doc/CrtObjCmd.3.orig
    +++ doc/CrtObjCmd.3
    @@ -46,7 +46,7 @@ Tcl_Command
     .AS Tcl_CmdDeleteProc *deleteProc in/out
     .AP Tcl_Interp *interp in
     Interpreter in which to create a new command or that contains a command.
    <span style="color:red">-.AP char *cmdName in</span>
    <span style="color:green">+.AP "const char" *cmdName in</span>
     Name of command.
     .AP Tcl_ObjCmdProc *proc in
     Implementation of the new command: \fIproc\fR will be called whenever
    --- doc/NRE.3.orig
    +++ doc/NRE.3
    @@ -40,7 +40,7 @@ void
     .AS Tcl_CmdDeleteProc *interp in
     .AP Tcl_Interp *interp in
     The relevant Interpreter.
    <span style="color:red">-.AP char *cmdName in</span>
    <span style="color:green">+.AP "const char" *cmdName in</span>
     Name of the command to create.
     .AP Tcl_ObjCmdProc *proc in
     Called in order to evaluate a command.  Is often just a small wrapper that uses
    </pre>
    
    Edit: I think the same goes for <tt>*list</tt> in SplitList.3:
    <pre>
    --- doc/SplitList.3.orig
    +++ doc/SplitList.3
    @@ -36,7 +36,7 @@ int
     .AP Tcl_Interp *interp out
     Interpreter to use for error reporting.  If NULL, then no error message
     is left.
    <span style="color:red">-.AP char *list in</span>
    <span style="color:green">+.AP "const char" *list in</span>
     Pointer to a string with proper list structure.
     .AP int *argcPtr out
     Filled in with number of elements in \fIlist\fR.
    </pre>
    
  2. login: "chrstphrchvz"
  3. mimetype: "text/plain"
  4. title changed to:
    CrtObjCmd.3, NRE.3, SplitList.3: constify cmdName, list