Skip to content
Tcl Source Code History Of Ticket 3216010
Login

History Of Ticket 3216010

Artifacts Associated With Ticket 3216010

  1. Ticket change [b0f616059d] (rid 98065) by petasis on 2011-03-16 11:05:13:

    1. assignee initialized to: "dkf"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      lsort -integer fails when trying to sort a list of wide integers (i.e. a list with timestamps, like clock milliseconds returns).
      
      I see for example in Tcl_LsortObjCmd(), in file tclCmdIL.c, line 3911 (may have changed I haven't updated to fossil):
      
      } else if (sortMode == SORTMODE_INTEGER) {
        long a;
        if (TclGetLongFromObj(sortInfo.interp, indexPtr, &a) != TCL_OK) {
          sortInfo.resultCode = TCL_ERROR;
          goto done1;
        }
        elementArray[i].index.intValue = a;
      
      I think that Tcl_GetWideIntFromObj() should be called if Tcl_GetLongFromObj() fails, before returning an error to the caller... 
      
    4. foundin initialized to: "None"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "petasis"
    10. subsystem initialized to: "17. Commands I-L"
    11. title initialized to: "lsort -integer fails with wide integers"
    12. type initialized to: "RFE"
  2. Ticket change [0ed72e1b17] (rid 94688) by dgp on 2011-03-16 22:28:38:

    1. icomment:
      
      
      data_type - 360894
      
      
      This is not a bug.  It's preservation of compatible output
      from [lsort -integer] across minor releases.
      
      That may be an unwise choice, but changing it is a 
      feature request.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. subsystem changed to: "17. Commands I-L"
    5. username: "dgp"
  3. Ticket change [5f6e2d7129] (rid 115822) by dgp on 2011-03-18 04:20:12:

    1. icomment:
      
      See http://core.tcl.tk/tcl/info/cf82eb92c8
      for a checkin implementing the requested
      functionality as [lsort -entier].
      
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  4. Ticket change [3c9384c19e] (rid 120938) by dgp on 2011-03-18 04:21:08:

    1. icomment:
      
      Very much un(der)tested at this point, BTW.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  5. Ticket change [e1b5ef7019] (rid 207176) by jan.nijtmans on 2022-11-22 22:43:38:

    1. assignee changed to: "jan.nijtmans"
    2. closedate changed to: "2459906.4469747"
    3. closer changed to: "jan.nijtmans"
    4. comment changed to:
      lsort -integer fails when trying to sort a list of wide integers (i.e. a list with timestamps, like clock milliseconds returns).
      
      I see for example in Tcl_LsortObjCmd(), in file tclCmdIL.c, line 3911 (may have changed I haven't updated to fossil):
      
      } else if (sortMode == SORTMODE_INTEGER) {
        long a;
        if (TclGetLongFromObj(sortInfo.interp, indexPtr, &a) != TCL_OK) {
          sortInfo.resultCode = TCL_ERROR;
          goto done1;
        }
        elementArray[i].index.intValue = a;
      
      I think that Tcl_GetWideIntFromObj() should be called if Tcl_GetLongFromObj() fails, before returning an error to the caller...
      
    5. icomment: "Fixed [f70fa16889ed757d|here]"
    6. login: "jan.nijtmans"
    7. mimetype: "text/x-fossil-wiki"
    8. resolution changed to: "Fixed"
    9. severity changed to: "Minor"
    10. status changed to: "Closed"
  6. Ticket change [fc4a3c694f] (rid 207177) by jan.nijtmans on 2022-11-22 22:45:30:

    1. closedate changed to: "2459906.4482738"
    2. icomment: "Dup of [47d66253c9]"
    3. login: "jan.nijtmans"
    4. mimetype: "text/x-fossil-wiki"