Tcl Source Code

Ticket Change Details
Login
Overview

Artifact ID: a5110c461a75610d53cff7e191a6e25927cb9dcb
Ticket: 47d66253c92197d30bff280b02e0a9e62f07cee2
"lsearch -sorted -integer" on 64bit system
User & Date: dgp 2014-01-16 13:19:05
Changes

  1. icomment:
    What this ticket seems to demonstrate, though,
    is that the meaning of "-integer" is inconsistent
    between [lsort] and [lsearch].  I confirm that.
    [lsort] uses Tcl_GetLongFromObj() and [lsearch]
    uses Tcl_GetIntFromObj(), so on systems where
    int and long are different (64-bit systems),
    they are inconsistent.
    
    That's an unfortunate mess.  Whether it's a bug,
    and if so whether fixing it would solve more problems
    or create more new ones, I'll have to discuss with
    others.
    
    This is all a symptom of the messy stew of integer
    treatment in Tcl that history has delivered to us.
    See TIP 297.
    
  2. login: "dgp"
  3. mimetype: "text/plain"