Skip to content
Tcl Source Code History Of Ticket 926590ffffffffffffffffffffffffffffffffff
Login

History Of Ticket 926590ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 926590ffffffffffffffffffffffffffffffffff

  1. Ticket change [e0ef59f898] (rid 87358) by jaspert on 2004-03-31 10:38:20:

    1. assignee initialized to: "hobbs"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      Not sure if this is a bug, but it seems very strange to
      me and there is no mention in the documentation.
      
      Normally if you execute a command in an interp using
      [interp eval] then that command is executed in global
      context. However if it is executed as part of a
      procedure in the parent interp that has been called by
      alias from another procedure in the same slave interp,
      then the command is executed in that slave interp
      procedure's context. I would expect it to go back to
      global context.
      
      Here's an example:
      
      /usr/local/ActiveTcl/bin/wish
      % info patchlevel
      8.4.6
      % set foo [interp create]
      interp0
      % $foo eval set nodecount 100
      100
      % $foo eval set nodecount
      100
      % $foo alias bar bar
      bar
      % proc bar {} {global foo; $foo eval set nodecount}
      % bar
      100
      % $foo eval bar
      100
      % $foo eval [list proc oink {} {bar}]
      % $foo eval oink
      can't read "nodecount": no such variable
      
      # next bit shows that if slave is entered from a
      different slave rather than itself, context is global
      
      % set foo2 [interp create]
      interp1
      % $foo2 alias bar bar
      bar
      % $foo2 eval [list proc oink {} {bar}]
      % $foo2 eval oink
      100
      
      
    4. foundin initialized to: "None"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "jaspert"
    9. subsystem initialized to: "20. [interp]"
    10. title initialized to: "Re-entering an interp keeps procedure context"
    11. type initialized to: "Bug"
  2. Ticket change [7a7faaf1b5] (rid 90331) by hobbs on 2004-05-04 05:43:10:

    1. assignee changed to: "msofer"
  3. Ticket change [4b4f2d4af3] (rid 126682) by msofer on 2004-05-04 06:03:29:

    1. icomment:
      Logged In: YES 
      user_id=148712
      
      Confirmed that execution is in the context of 'oink': 
      % $foo eval [list proc oink {} {set nodecount 200; bar}]
      % $foo eval oink
      200
      
      Not sure yet if this is a bug in the docs or in the code;
      investigating.
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  4. Add attachment "926590.patch" [28afe6ad63] (rid 88741) by msofer on 2004-05-04 06:43:48.

  5. Ticket change [3130bf085d] (rid 93382) by msofer on 2004-05-04 06:43:48:

    1. assignee changed to: "hobbs"
    2. icomment:
      
      
      File Added - 85982: 926590.patch
      
      Logged In: YES 
      user_id=148712
      
      I think this is a doc bug: the evaluation in the slave
      occurs in whatever scope or context is current in the slave.
      I am not sure of the possible security implications for safe
      slaves.
      Attaching a doc+test patch for review.
      
      
    3. login: "msofer"
    4. mimetype: "text/plain"
    5. username: "msofer"
  6. Ticket change [f50e769e9b] (rid 130042) by dkf on 2004-05-04 16:34:28:

    1. foundin changed to: "obsolete: 8.4.6"
    2. icomment:
      Logged In: YES 
      user_id=79902
      
      This is a doc-fault at best.  [$foo eval] has to use the
      child's current context since that is the only way to allow
      access to the local variables in the child.  Without this,
      you would be unable to sensibly override commands like
      [while] or [for]...
      
      Perhaps there should be a way to say that you want to
      evaluate some code in a particular namespace, but that's
      somewhat beside the point.
      
      
    3. login: "dkf"
    4. mimetype: "text/plain"
    5. username: "dkf"
  7. Ticket change [cb22021380] (rid 95473) by hobbs on 2004-09-21 05:24:22:

    1. assignee changed to: "dkf"
    2. icomment:
      Logged In: YES 
      user_id=72656
      
      Agreed, this is just missing doc, as it has to be this way
      by design.
      
      
    3. login: "hobbs"
    4. mimetype: "text/plain"
    5. username: "hobbs"
  8. Ticket change [e63e060db0] (rid 104270) by dkf on 2004-09-21 23:22:02:

    1. closedate changed to: "2004-09-21T16:22:02"
    2. closer changed to: "dkf"
    3. icomment:
      Logged In: YES 
      user_id=79902
      
      Fixed in HEAD.
      
      
    4. login: "dkf"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "dkf"
  9. Ticket change [643771dd2b] (rid 92720) by dgp on 2004-10-27 00:54:48:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      backport?
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. priority changed to: "9 Immediate"
    5. username: "dgp"