Skip to content
Tcl Source Code History Of Ticket 1187123fffffffffffffffffffffffffffffffff
Login

History Of Ticket 1187123fffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 1187123fffffffffffffffffffffffffffffffff

  1. Ticket change [489aac15d9] (rid 99919) by dgp on 2005-04-21 05:38:05:

    1. assignee initialized to: "msofer"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      
      % set x 5
      5
      % string is boolean $x 
      0
      % namespace ensemble create -prefixes $x
      ::
      % string is boolean $x
      1
      % set x
      5
      
      So $x is/is not a valid boolean
      depending on its Tcl_ObjType.
      
      Foundation of the bug is that
      Tcl_GetBoolean and
      Tcl_GetBooleanFromObj
      are inconsistent in the sets
      of strings they accept as 
      valid boolean values.
      
    4. foundin initialized to: "obsolete: 8.5a3"
    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: "booleans break EIAS"
    11. type initialized to: "Bug"
  2. Ticket change [c7b6c0001f] (rid 121986) by dgp on 2005-04-21 13:09:59:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      Also lurking here is the inconsistency
      in the set of values that pass
      
          string is boolean -strict $x
      
      and the set of values that do not
      raise an error in:
      
          expr {$x && $x}
      
      Consider $x having value "5" 
      or "0xface" or "3.14159".  
      All rejected by [string is boolean]
      (unless shimmering confuses)
      but all accepted by [expr] as
      operands to its boolean operators.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  3. Ticket change [d48b2a9aed] (rid 123465) by msofer on 2005-04-21 19:01:27:

    1. icomment:
      Logged In: YES 
      user_id=148712
      
      Re the second comment: that is ok according to the docs. 
      
      The boolean operators take as arguments booleans *or*
      numbers, and produce an integer 0/1 result - according to
      both the [expr] man page and TEBC.
      
      [string is boolean] OTOH is supposed to only recognise the
      forms 0/1, yes/no, on/off and true/false according to the
      [string] and Tcl_GetBoolean manuals. In other words, 
         [string is boolean $x]
      is not supposed to coincide with
         [expr ![catch {expr $x && $x}]]
      
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  4. Ticket change [656ff056c3] (rid 102548) by msofer on 2005-04-21 19:14:51:

    1. icomment:
      Logged In: YES 
      user_id=148712
      
      The function that does not agree with the docs is
      Tcl_GetBooleanFromObj: what the code does is return the
      value of [expr !!$x] (or an error). What the docs say it
      does is identical to Tcl_GetBoolean.
      
      The part that is wrong is branded as
      /*
           * Use the obvious shortcuts for numerical values; if
      objPtr is not
           * of numerical type, parse its string rep.
           */
      
      Obvious maybe ... but wrong. This provides a
      "Tcl_GetTruthValueFromObj" or something like that.
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  5. Ticket change [e4c8272e2c] (rid 88019) by dgp on 2005-04-22 03:24:11:

    1. assignee changed to: "dgp"
    2. icomment:
      Logged In: YES 
      user_id=80530
      
      
      committing fix to HEAD.
      
      Backport will require some more effort.
      
      
    3. login: "dgp"
    4. mimetype: "text/plain"
    5. username: "dgp"
  6. Ticket change [9ca457713b] (rid 96180) by dgp on 2005-04-22 22:54:18:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      corrected fix committed to HEAD.
      
      still needs backport.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  7. Ticket change [1858ca207e] (rid 122644) by dgp on 2005-04-22 23:31:03:

    1. closedate changed to: "2005-04-22T16:31:03"
    2. closer changed to: "dgp"
    3. icomment:
      Logged In: YES 
      user_id=80530
      
      
      More cautious fix committed for 8.4.10.
      
      
    4. login: "dgp"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "dgp"