Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: b0f616059df7f5401015b96f63439fd8ba4ebda1
Ticket: 3216010fffffffffffffffffffffffffffffffff
lsort -integer fails with wide integers
User & Date: petasis on 2011-03-16 11:05:13
Changes

  1. assignee changed to: "dkf"
  2. cmimetype changed to: "text/plain"
  3. 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... 
    
  4. foundin changed to: "None"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "petasis"
  10. subsystem changed to: "17. Commands I-L"
  11. title changed to: "lsort -integer fails with wide integers"
  12. type changed to: "RFE"