Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 09ee2ae5ad68a0e3bd830d020eadbcd85c2780e7
Ticket: 0363f0146cb1f0fa152c7d853ea1788b851dacce
array search commands fail to recognize all names for variable
User & Date: dgp on 2016-07-25 17:18:34
Changes

  1. closedate changed to: "2457595.22122976"
  2. closer changed to: "dgp"
  3. icomment:
    
    The code was improperly using the varname embedded in the search
    ID to compare the varname argument of the invoked command
    and report that the wrong variable was used when they failed to
    match.  As this bug report shows, that was done at best improperly
    in any environment where the same variable can have many names.
    
    Back when the array search command collection was invented, that
    was at least a much rarer, if not impossible circumstance, with no
    namespaces to bother us.
    
    Clearly, it would be a sufficient interface revision to pass in the
    search-ID only.  Then there could be no mismatch to worry about.
    In that revision, we'd need only for the search ID to be unique among
    the active searches in the interp. (To detect probable bugs, uniqueness
    over interp lifetime would be even better.)
    
    The one specific "user" that needs compatibility maintained is the
    set of tests in set-old.test.  Could have changed them too, but I've
    taken them as representative of other code out there not wanting
    its applecart turned over -- especially not in a patch release.
    
  4. login: "dgp"
  5. mimetype: "text/plain"