Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 586544ada12c399d86d1e25a7d63a109120c7a8e
Ticket: 3185009fffffffffffffffffffffffffffffffff
TclOO variable unset problem
User & Date: danckaert on 2011-02-17 16:52:44
Changes

  1. assignee changed to: "dkf"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    There is a problem when configuring object variables using objdefine->variable, and unsetting such a variable:
    
    oo::object create p
    oo::objdefine p variable x
    oo::objdefine p method set {v} {set x $v}
    oo::objdefine p method unset {} {unset x}
    oo::objdefine p method exists {} {info exists x}
    oo::objdefine p method get {} {return $x}
    
    p exists   ; # returns 0  (ok)
    p set 7
    p exists   ; # returns 1  (ok)
    p get      ; # returns 7  (ok)
    p unset
    p exists   ; # returns 1  (wrong)
    p get      ; # Segmentation fault
    
    The above is when running interactively. In non-interactive mode, it already aborts on the second "info exists", with:
    malformed bucket chain in Tcl_DeleteHashEntry
    Abort
    
    
  4. foundin changed to: "obsolete: 8.6b1.1"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "danckaert"
  10. subsystem changed to: "35. TclOO Package"
  11. title changed to: "TclOO variable unset problem"
  12. type changed to: "Bug"