Artifacts Associated With Ticket 219151
Ticket change [de8f6d4a26] (rid 114874) by nobody on 2000-10-26 05:02:21:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- 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
- foundin initialized to: "obsolete: 8.0.4"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "75. Tutorial"
- title initialized to:
Annoying ANSI signatures of many Tcl library functions.
- type initialized to: "Bug"
Ticket change [3af9fc5ed6] (rid 112651) by dgp on 2001-02-08 14:21:26:
- assignee changed to: "kennykb"
- icomment:
Kevin Kenny is planning a TIP to tackle this.
- login: "dgp"
- mimetype: "text/plain"
- subsystem changed to: ""
- username: "dgp"
Ticket change [b606f41ba5] (rid 125354) by kennykb on 2001-04-10 06:17:42:
- 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.
- login: "kennykb"
- mimetype: "text/plain"
- username: "kennykb"
- icomment:
Ticket change [7a6d303468] (rid 90316) by dgp on 2001-04-12 19:39:57:
- icomment:
Logged In: YES user_id=80530 See also Patch 415648
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [da6dd671ef] (rid 107783) by kennykb on 2002-02-11 03:12:58:
- assignee changed to: "dgp"
- icomment:
Logged In: YES user_id=99768 Don, does advancing TIP #27 to Final take care of this?
- login: "kennykb"
- mimetype: "text/plain"
- username: "kennykb"
Ticket change [e0614362e1] (rid 115184) by dgp on 2002-02-11 05:14:50:
- assignee changed to: "kennykb"
- 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. - login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
Ticket change [a5dbe95b4b] (rid 110445) by kennykb on 2002-02-12 02:49:08:
- closedate changed to: "2002-02-11T19:49:08"
- closer changed to: "kennykb"
- icomment:
Logged In: YES user_id=99768 I think Don's comments say it all.
- login: "kennykb"
- mimetype: "text/plain"
- status changed to: "Closed"
- username: "kennykb"
Ticket change [7fcf1643b3] (rid 148419) by dkf on 2016-08-22 12:33:11:
- assignee changed to: "aku"
- closedate changed to: "2457623.02305529"
- closer changed to: "dkf"
- 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
- login: "dkf"
- mimetype: "text/plain"
- severity changed to: "Minor"
- subsystem changed to: "69. Other"