Tcl Source Code

Ticket Change Details
Login
Overview

Artifact ID: c3a8d47a81ae263faab9f9cd66533f06bd811d91
Ticket: 5edbc4a9f40bd2cfce24e291fc57dea51b7f1a50
It's not possible to manipulate complex data structures inside procs
User & Date: anonymous 2015-09-04 03:44:01
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed to:
    In the next code, it's not possible to make manipulations in place, because the reference count is greater than 1. Another possibility is that ::tcl::unsupported::representation lies, and shows the pointer of another object.
    
    I am getting this output:
       value is a pure string with a refcount of 4, object pointer at 0x8528378, string representation "data"
       value is a pure string with a refcount of 5, object pointer at 0x8528378, string representation "data"
    
    This is the code:
    
    
    proc test {} {
        set variable_name data
        puts [::tcl::unsupported::representation $variable_name]
    }
    
    test
    
    namespace eval A { 
        variable var_A data
        puts [::tcl::unsupported::representation $var_A]
        
    }
    
  5. foundin changed to: "8.6"
  6. is_private changed to: "0"
  7. login: "anonymous"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "1c4b6cdb98c9dfc4d1e74018f3f4efa00ad217e2"
  10. resolution changed to: "None"
  11. severity changed to: "Minor"
  12. status changed to: "Open"
  13. submitter changed to: "anonymous"
  14. subsystem changed to: "10. Objects"
  15. title changed to:
    It's not possible to manipulate complex data structures inside procs
    
  16. type changed to: "Bug"