Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 5c72ae30c9f72ac184df00cca974df40abf158d77e4490f0aed23ea581e13ea2
Ticket: 309cfea3a209993f055e966c436bc16746f7f8e8
Append does not trigger variable read traces
User & Date: ambaker1 on 2023-10-03 15:46:41
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-markdown"
  4. comment changed to:
    The "append" command does not trigger variable read traces.
    
    ```
    # Bug with read trace with Tcl append command.
    proc ReadTrace {name1 name2 op} {
        upvar 1 $name1 var
        set var foo
    }
    trace add variable x read ReadTrace
    # lappend triggers the read-trace, modifying x before writing to it.
    set x hello
    puts [lappend x bar]; # foo bar
    # lset triggers it as well.
    set x hello
    puts [lset x end+1 bar]; # foo bar
    # append, on the other hand, does not trigger the read trace.
    set x hello
    puts [append x { bar}]; # hello bar
    puts $x; # foo
    ```
    
  5. foundin changed to: "8.6.10"
  6. is_private changed to: "0"
  7. login: "ambaker1"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "7a509cad0db427d3ca1119e0562512ea2f5279d6"
  10. resolution changed to: "None"
  11. severity changed to: "Important"
  12. status changed to: "Open"
  13. submitter changed to: "ambaker1"
  14. subsystem changed to: "07. Variables"
  15. title changed to: "Append does not trigger variable read traces"
  16. type changed to: "Bug"