Skip to content
Tcl Source Code History Of Ticket 0363f0146c
Login

History Of Ticket 0363f0146c

Artifacts Associated With Ticket 0363f0146c

  1. Ticket change [521a6ff7e1] (rid 146177) by dgp on 2016-04-04 20:12:54:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. comment initialized to:
      
      Little used corner of Tcl apparently never made aware of namespaces,
      or any other way distinct variable names can refer to the same variable.
      
      % array anymore tcl_platform [array startsearch ::tcl_platform]
      search identifier "s-1-::tcl_platform" isn't for variable "tcl_platform"
      
    5. foundin initialized to: "all"
    6. is_private initialized to: "0"
    7. login: "dgp"
    8. priority initialized to: "5 Medium"
    9. resolution initialized to: "None"
    10. severity initialized to: "Minor"
    11. status initialized to: "Open"
    12. submitter initialized to: "dgp"
    13. subsystem initialized to: "07. Variables"
    14. title initialized to:
      array search commands fail to recognize all names for variable
      
    15. type initialized to: "Bug"
  2. Ticket change [5067c47848] (rid 146239) by anonymous on 2016-04-07 23:22:26:

    1. comment changed to:
      Little used corner of Tcl apparently never made aware of namespaces,
      or any other way distinct variable names can refer to the same variable.
      
      % array anymore tcl_platform [array startsearch ::tcl_platform]
      search identifier "s-1-::tcl_platform" isn't for variable "tcl_platform"
      
    2. icomment:
      The suggested command returns that error, but this other command returns 1:
      puts [array anymore ::tcl_platform [array startsearch ::tcl_platform]]
      
    3. login: "anonymous"
    4. mimetype: "text/plain"
  3. Ticket change [c999e4dca6] (rid 148148) by dgp on 2016-07-19 17:17:27:

    1. icomment:
      % array set foo {1 2 3 4 5 6}
      % set as1 [array startsearch foo]
      s-1-foo
      % namespace eval n {
      variable foo
      array set foo {a b c d e f}
      set ::as2 [array startsearch foo]
      }
      s-1-foo
      
      At this point $::as1 and $::as2 hold
      identical string values.  They are interchangeable
      as identifiers of both searches, which implies
      they are not unique identifiers of either search.
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  4. Ticket change [79242fcac9] (rid 148155) by dgp on 2016-07-19 19:55:39:

    1. assignee changed to: "dgp"
    2. closedate changed to: "2457589.33031557"
    3. closer changed to: "dgp"
    4. icomment:
      
      Fixed the original issue on trunk (8.7a).
      
      Left the second issue alone and made no 
      change to the 8.6 and lower branches out
      of (too much?) concern for not disrupting things.
      
    5. login: "dgp"
    6. mimetype: "text/plain"
    7. resolution changed to: "Fixed"
    8. status changed to: "Closed"
  5. Ticket change [8707c32219] (rid 148233) by mistachkin on 2016-07-22 23:27:55:

    1. closedate changed to: "2457592.47772372"
    2. closer changed to: "mistachkin"
    3. icomment:
      I don't understand why the variable name is part of the returned array search
      identifier.  I'm guessing this is unspecified behavior?  Is this required for
      script compatibility by anything that we know of?
      
    4. login: "mistachkin"
    5. mimetype: "text/plain"
  6. Ticket change [09ee2ae5ad] (rid 148257) by dgp on 2016-07-25 17:18:34:

    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"