Skip to content
Tcl Source Code History Of Ticket 1194015
Login

History Of Ticket 1194015

Artifacts Associated With Ticket 1194015

  1. Ticket change [f9d61e179a] (rid 91764) by dgp on 2005-05-02 19:47:35:

    1. assignee initialized to: "msofer"
    2. cmimetype initialized to: "text/plain"
    3. 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.)
      
      
    4. foundin initialized to: "None"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "dgp"
    9. subsystem initialized to: "10. Objects"
    10. title initialized to: "macro-ize TclFormatInt"
    11. type initialized to: "RFE"
  2. Ticket change [43ba2f6125] (rid 116611) by jenglish on 2005-05-04 04:51:44:

    1. 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.
      
      
    2. login: "jenglish"
    3. mimetype: "text/plain"
    4. username: "jenglish"
  3. Ticket change [acc981a69e] (rid 101353) by dgp on 2005-07-06 01:15:23:

    1. assignee changed to: "dgp"
    2. closedate changed to: "2005-07-05T18:15:23"
    3. closer changed to: "dgp"
    4. icomment:
      Logged In: YES 
      user_id=80530
      
      
      committing the attached patch
      to HEAD.
      
      
    5. login: "dgp"
    6. mimetype: "text/plain"
    7. resolution changed to: "Accepted"
    8. status changed to: "Closed"
    9. username: "dgp"
  4. Add attachment "1194015.patch" [2cb2ce7869] (rid 118951) by dgp on 2005-07-06 01:15:23.

  5. Ticket change [7e4504917a] (rid 97384) by dgp on 2005-07-06 01:15:25:

    1. icomment:
      
      
      File Added - 140953: 1194015.patch
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  6. Ticket change [89de8b4c46] (rid 127296) by hobbs on 2010-12-01 01:14:23:

    1. 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.
      
      
    2. login: "hobbs"
    3. mimetype: "text/plain"
    4. username: "hobbs"