Overview
| Artifact ID: | 06462983f819e3796e65b75205baeafec825fe64 |
|---|---|
| Ticket: | 967565ffffffffffffffffffffffffffffffffff
[info level] reports current interp's CallFrames only |
| User & Date: | mistachkin on 2004-06-06 12:15:51 |
Changes
- assignee changed to: "hobbs"
- cmimetype changed to: "text/plain"
- comment changed to:
Unless I have missed something in the docs (which is entirely possible at this hour), this behaviour is either a bug or a documentation oversight. Is there some bad interaction here between slave interps and [interp alias]? Perhaps the combination of slave interps and namespaces triggers this problem? If this is NOT a bug, it is still downright confusing. Having [info level] "skip over" a caller in the stack is not ideal. ---- namespace eval ::test { proc procA { interp } { if {$interp} then { global i interp alias $i ::test::A::procB {} ::test::procB interp eval $i [list namespace eval ::test::A procC] } else { interp alias {} ::test::A::procB {} ::test::procB namespace eval ::test::A procC } } proc procB {} { set current [lindex [info level [info level]] 0] # should print "::test::procB" puts stdout "current ([info level]) == $current" if {$current == "::test::procB"} then { puts stdout "SUCCESS, current proc match." } else { puts stdout "FAILURE, current proc mismatch." } set parent [lindex [info level [expr {[info level] - 1}]] 0] # should print "::test::A::procC" or "procC" puts stdout "parent ([info level] - 1) == $parent" if {[string match "*procC" $parent]} then { puts stdout "SUCCESS, parent proc match." } else { puts stdout "FAILURE, parent proc mismatch." } } } foreach this_interp [list 0 1] { puts stdout "Running test with use_new_interp set to $this_interp." if {$this_interp} then { set i [interp create] interp eval $i { namespace eval ::test::A { proc procC {} { procB } } } } else { namespace eval ::test::A { proc procC {} { procB } } } ::test::procA $this_interp } - foundin changed to: "None"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "mistachkin"
- subsystem changed to: "20. [interp]"
- title changed to: "[interp alias] problem..."
- type changed to: "Bug"