Skip to content
Tcl Source Code History Of Ticket 219151
Login

History Of Ticket 219151

Artifacts Associated With Ticket 219151

  1. Ticket change [de8f6d4a26] (rid 114874) by nobody on 2000-10-26 05:02:21:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      OriginalBugID: 1162 RFE
      Version: 8.0.4
      SubmitDate: '1999-02-02'
      LastModified: '2000-05-17'
      Severity: MED
      Status: Assigned
      Submitter: pat
      ChangedBy: hobbs
      RelatedBugIDs: 2580
      OS: Solaris
      OSVersion: 2.6
      Machine: Other
      FixedDate: '2000-10-25'
      ClosedDate: '2000-10-25'
      
      
      Name:
      Krzysztof Kozminski
      
      Extensions:
      BLT, DP, Expect, Tree, Itcl, Itk and about a dozen others...
      
      DesiredBehavior:
      Many Tcl API procedures take a "char *" argument where they really could take a "const char *" if only some minor effort was dedicated to fixing the procedures that really have no business accessing their arguments as writable strings.
      
      This causes annoying warnings whenever compiling code that follows the discipline of calling constant a constant, e.g., when one uses RogueWave tools for string processing and then tries to pass the result to Tcl.
      
      It would be really nice if functions like:
      Tcl_CommandComplete, Tcl_Eval, Tcl_AppendElement, Tcl_StringMatch, Tcl_SetResult, Tcl_FindHashEntry, Tcl_CreateHashEntry, and many others were capable to take const char *.
      
      I tend to consider the current signatures more of a bug, than a missing feature...
      
      KK
      
      
      
      Should really use CONST, isn't a big deal, although it changes
      many core sigs. (updated stubs and all). 
      -- 04/03/2000 hobbs
      
    4. foundin initialized to: "obsolete: 8.0.4"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "75. Tutorial"
    10. title initialized to:
      Annoying ANSI signatures of many Tcl library functions.
      
    11. type initialized to: "Bug"
  2. Ticket change [3af9fc5ed6] (rid 112651) by dgp on 2001-02-08 14:21:26:

    1. assignee changed to: "kennykb"
    2. icomment:
      Kevin Kenny is planning a TIP to tackle this.
      
      
    3. login: "dgp"
    4. mimetype: "text/plain"
    5. subsystem changed to: ""
    6. username: "dgp"
  3. Ticket change [b606f41ba5] (rid 125354) by kennykb on 2001-04-10 06:17:42:

    1. icomment:
      Logged In: YES 
      user_id=99768
      
      Of the calls that the user lists, Tcl_Eval and Tcl_SetResult actually need pointers to non-constant strings. 
      Tcl_Eval overwrites the string as it is parsing it, and Tcl_SetResult with TCL_DYNAMIC or a user memory 
      management procedure requires pointer to non-const so that the memory can be freed.  The other calls 
      that the user lists (and many more) can and should be fixed, per TIP#27.
      
      
    2. login: "kennykb"
    3. mimetype: "text/plain"
    4. username: "kennykb"
  4. Ticket change [7a6d303468] (rid 90316) by dgp on 2001-04-12 19:39:57:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      See also Patch 415648
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  5. Ticket change [da6dd671ef] (rid 107783) by kennykb on 2002-02-11 03:12:58:

    1. assignee changed to: "dgp"
    2. icomment:
      Logged In: YES 
      user_id=99768
      
      Don, does advancing TIP #27 to Final take care of this?
      
      
    3. login: "kennykb"
    4. mimetype: "text/plain"
    5. username: "kennykb"
  6. Ticket change [e0614362e1] (rid 115184) by dgp on 2002-02-11 05:14:50:

    1. assignee changed to: "kennykb"
    2. icomment:
      Logged In: YES 
      user_id=80530
      
      Basically, yes.  TIP 27 changed all the interfaces that
      can reasonably be changed without major (Tcl 9?) rewrites
      to Tcl's internals.
      
      Any script passed to Tcl_Eval and friends must
      be a writable string, because parsing of ']' writes on the
      string.  Likewise, any variable name must be passed as a
      writable string because the parsing of ')' in array element
      variables writes on the string.  For these reasons,
      Tcl_CommandComplete, Tcl_Eval, etc. have not been changed.
      Tcl_SetResult has not been changed because its freeProc
      argument controls the real treatment of the string, and
      the ability to pass the string to the (freeProc) as a
      writable string needs to be preserved.  The following
      cast is always safe:
      
          Tcl_SetResult(interp, (char *) str, TCL_VOLATILE);
      
      and any new code ought to be using Tcl_SetObjResult
      anyway.
      
      The other specific requests in this report have all been
      converted as part of the TIP 27 effort.
      
      Either close this report entirely, or convert it to a 
      Feature Request for the remaining changes to be considered 
      in the Tcl 9 time frame.
      
      
    3. login: "dgp"
    4. mimetype: "text/plain"
    5. username: "dgp"
  7. Ticket change [a5dbe95b4b] (rid 110445) by kennykb on 2002-02-12 02:49:08:

    1. closedate changed to: "2002-02-11T19:49:08"
    2. closer changed to: "kennykb"
    3. icomment:
      Logged In: YES 
      user_id=99768
      
      I think Don's comments say it all.
      
      
    4. login: "kennykb"
    5. mimetype: "text/plain"
    6. status changed to: "Closed"
    7. username: "kennykb"
  8. Ticket change [7fcf1643b3] (rid 148419) by dkf on 2016-08-22 12:33:11:

    1. assignee changed to: "aku"
    2. closedate changed to: "2457623.02305529"
    3. closer changed to: "dkf"
    4. comment changed to:
      OriginalBugID: 1162 RFE
      Version: 8.0.4
      SubmitDate: '1999-02-02'
      LastModified: '2000-05-17'
      Severity: MED
      Status: Assigned
      Submitter: pat
      ChangedBy: hobbs
      RelatedBugIDs: 2580
      OS: Solaris
      OSVersion: 2.6
      Machine: Other
      FixedDate: '2000-10-25'
      ClosedDate: '2000-10-25'
      
      
      Name:
      Krzysztof Kozminski
      
      Extensions:
      BLT, DP, Expect, Tree, Itcl, Itk and about a dozen others...
      
      DesiredBehavior:
      Many Tcl API procedures take a "char *" argument where they really could take a "const char *" if only some minor effort was dedicated to fixing the procedures that really have no business accessing their arguments as writable strings.
      
      This causes annoying warnings whenever compiling code that follows the discipline of calling constant a constant, e.g., when one uses RogueWave tools for string processing and then tries to pass the result to Tcl.
      
      It would be really nice if functions like:
      Tcl_CommandComplete, Tcl_Eval, Tcl_AppendElement, Tcl_StringMatch, Tcl_SetResult, Tcl_FindHashEntry, Tcl_CreateHashEntry, and many others were capable to take const char *.
      
      I tend to consider the current signatures more of a bug, than a missing feature...
      
      KK
      
      
      
      Should really use CONST, isn't a big deal, although it changes
      many core sigs. (updated stubs and all). 
      -- 04/03/2000 hobbs
      
    5. login: "dkf"
    6. mimetype: "text/plain"
    7. severity changed to: "Minor"
    8. subsystem changed to: "69. Other"