Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: e29f0649e845dd80e52919dbaa98f8acb1e08814
Ticket: 1439836fffffffffffffffffffffffffffffffff
TCL_EVAL_GLOBAL vs. [uplevel #0]
User & Date: dgp on 2006-02-27 19:21:19
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    
    The flag TCL_EVAL_GLOBAL ought to
    have identical impact as [uplevel #0],
    but these tests demo they are different
    when exec traces are present:
    
    test trace-21.9 {trace execution: TCL_EVAL_GLOBAL} {
        trace add execution foo enter soom
        proc ::soom args {lappend ::info SUCCESS [info level]}
        set ::info {}
        namespace eval test_ns_1 {
            proc soom args {lappend ::info FAIL [info level]}
            # [testevalobjv 1 ...] ought to produce the same
            # results as [uplevel #0 ...].
            testevalobjv 1 foo x
            uplevel #0 foo x
        }
        namespace delete test_ns_1
        trace remove execution foo enter soom
        set ::info
    } {SUCCESS 1 SUCCESS 1}
       
    test trace-21.10 {trace execution: TCL_EVAL_GLOBAL} {
        trace add execution foo leave soom
        proc ::soom args {lappend ::info SUCCESS [info level]}
        set ::info {}
        namespace eval test_ns_1 {
            proc soom args {lappend ::info FAIL [info level]}
            # [testevalobjv 1 ...] ought to produce the same
            # results as [uplevel #0 ...].
            testevalobjv 1 foo x
            uplevel #0 foo x
        }
        namespace delete test_ns_1
        trace remove execution foo leave soom
        set ::info
    } {SUCCESS 1 SUCCESS 1}
    
    
  4. foundin changed to: "None"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "dgp"
  9. subsystem changed to: "None"
  10. title changed to: "exec trace: TCL_EVAL_GLOBAL vs. [uplevel #0]"
  11. type changed to: "Bug"