Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 3e647d89df52fc82c4b965179654b49d03614c82
Ticket: 1165062fffffffffffffffffffffffffffffffff
TIP #182: [expr bool()] implementation
User & Date: mistachkin on 2005-05-17 13:20:59
Changes

  1. icomment:
    Logged In: YES 
    user_id=113501
    
    
    The new patch looks good.  However, I still think we need to
    add the changes to tclExecute.c back into it.
    
    @@ -4506,7 +4509,14 @@
          * from the string rep.
          */
         if ((tPtr == &tclBooleanType) && (valuePtr->bytes ==
    NULL)) {
    -valuePtr->typePtr = &tclIntType;
    +/*
    + * JJM: For TIP #182, changed this from tclIntType to
    tclBooleanType
    + * so that [expr bool()] returns a "real" boolean.  This
    change causes
    + * no test failures and should be totally innocuous
    because at this point
    + * we are guaranteed to have a numeric boolean result
    with no string rep
    + * per the enclosing if statement.
    + */
    +valuePtr->typePtr = &tclBooleanType;
     converted = 1;
         } else {
     s = Tcl_GetStringFromObj(valuePtr, &length);
    
    
    
  2. login: "mistachkin"
  3. mimetype: "text/plain"
  4. username: "mistachkin"