Artifacts Associated With Ticket 1194015
Ticket change [f9d61e179a] (rid 91764) by dgp on 2005-05-02 19:47:35:
- assignee initialized to: "msofer"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Given char *buf; long l; it appears that TclFormatInt(buf, l); is the equivalent of sprintf(buf, "%ld", l); Therefore, I request to make TclFormatInt a macro, #define'd in tclInt.h : #define TclFormatInt(buf, l) sprintf((buf), "%ld", (l)) Some compatibility provisions can be made for the internal stubs table slot currently occupied by the TclFormatInt routine. The comments of TclFormatInt allege: * ...This * procedure has the effect of sprintf(buffer, "%d", n) but is faster. Frankly, I don't believe that. (Even ignoring the "d" for "ld" error.)
- foundin initialized to: "None"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "dgp"
- subsystem initialized to: "10. Objects"
- title initialized to: "macro-ize TclFormatInt"
- type initialized to: "RFE"
Ticket change [43ba2f6125] (rid 116611) by jenglish on 2005-05-04 04:51:44:
- icomment:
Logged In: YES user_id=68433 One possible problem area: because of the function prototype, at any call sites that currently pass an 'int' as the second parameter it will be silently promoted to 'long'; if TclFormatInt() is replaced with a macro this will no longer happen. Also: this would introduce another dependency on <stdio.h>. This probably isn't a big deal since <tcl.h> already #includes it and there are a bunch of other dependencies already.
- login: "jenglish"
- mimetype: "text/plain"
- username: "jenglish"
- icomment:
Ticket change [acc981a69e] (rid 101353) by dgp on 2005-07-06 01:15:23:
- assignee changed to: "dgp"
- closedate changed to: "2005-07-05T18:15:23"
- closer changed to: "dgp"
- icomment:
Logged In: YES user_id=80530 committing the attached patch to HEAD.
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Accepted"
- status changed to: "Closed"
- username: "dgp"
Add attachment "1194015.patch" [2cb2ce7869] (rid 118951) by dgp on 2005-07-06 01:15:23.
Ticket change [7e4504917a] (rid 97384) by dgp on 2005-07-06 01:15:25:
- icomment:
File Added - 140953: 1194015.patch
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [89de8b4c46] (rid 127296) by hobbs on 2010-12-01 01:14:23:
- icomment:
Just to note this change was reverted for 8.6 and 8.5.10 on 2010-11-30 after benchmarks proved TclFormatInt to be faster. This is key to Tcl's int->string conversions, and the win is likely primarily in sprintf not needing to parse the "%ld" format.
- login: "hobbs"
- mimetype: "text/plain"
- username: "hobbs"
- icomment: