Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: dcb5ed44c8053a2107c850bcc9a58a3fa7081bc2
Ticket: 1338280fffffffffffffffffffffffffffffffff
unset traces during namespace delete misbehave
User & Date: msofer on 2005-10-26 09:53:00
Changes

  1. assignee changed to: "msofer"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    (neuronstorm reports in clt:
    http://groups.google.com/group/comp.lang.tcl/browse_frm/thread/91073af364234a81/3a1aa30e489f3eb0#3a1aa30e489f3eb0
    
    The following script demonstrates an invalid result
    (empty string element in list) from [info vars
    ?pattern?] during unset traces called during [namespace
    delete].
    
    ----
    
     namespace eval ::ref {}
    
     set ::ref::var1 AAA
     trace add variable ::ref::var1 {unset} [list doTrace]
    
     set ::ref::var2 BBB
     trace add variable ::ref::var2 {unset} [list doTrace]
    
     proc doTrace {vtraced vidx op} {
            puts stdout "'[info vars ::ref::*]'"
     }
    
     namespace delete ::ref
    
     puts stdout "'[info vars ::ref::*]'"
    
    ----
    
    Output on windows Tcl 8.5a4 is:
     '::ref::var1 ::ref::var2'
     '{} ::ref::var2'
     ''
    
    Output on windows Tcl 8.4.5 is:
     '::ref::var1 ::ref::var2'
     '::ref::var2'
     ''
    
    Tcl8.4.7 behaves like 8.4.5, core-8-4-branch like 8.5a4
    
  4. foundin changed to: "obsolete: 8.4.11"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "msofer"
  9. subsystem changed to: "07. Variables"
  10. title changed to: "unset traces during namespace delete misbehave"
  11. type changed to: "Bug"