Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: a5a111040be5e7f93be689bc28c4cdaf81055974
Ticket: 2251175fffffffffffffffffffffffffffffffff
Expand ({*}), constants, and list syntax
User & Date: ferrieux on 2008-11-10 15:30:15
Changes

  1. icomment:
    Ouch :-)
    
    First, a simpler way of summing up the bug is to notice the violation of the invariant
     
       list {*}{SOMETHING}  ==  [lrange {SOMETHING} 0 end]
    
    Second, we witness this violation only for expanded literals, that is, those that are expanded directly within the token stream of the parser.
    
    Third, this indeed is due to the fact that the relevant part of the code in tclParse.c only calls TclFindElement instead of Tcl_GetListFromObj or equivalent.
    This makes a whole lot of a difference of course, since Tcl_GetListFromObj..SetListFromAny calls both TclFindElement *and* TclCopyAndCollapse, which does the necessary backslash subst.
    
    Miguel, why this ? Premature optimization ;-) ?
    
    -Alex
    
    
    
  2. login: "ferrieux"
  3. mimetype: "text/plain"
  4. username: "ferrieux"