Skip to content
Tcl Source Code History Of Ticket 218015ffffffffff
Login

History Of Ticket 218015ffffffffff

Artifacts Associated With Ticket 218015ffffffffff

  1. Ticket change [d1b15aed88] (rid 113397) by nobody on 2000-10-26 00:52:12:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      OriginalBugID: 929 Bug
      Version: 8.1a2
      SubmitDate: '1998-12-04'
      LastModified: '1999-04-19'
      Severity: SER
      Status: Closed
      Submitter: welch
      ChangedBy: rjohnson
      OS: Windows NT
      Machine: X86
      FixedDate: '2000-10-25'
      ClosedDate: '1998-12-08'
      
      
      Name:
      Lucio Ferrao
      
      CVS:
      1998/12/04 ($Id: tclInterp.c,v 1.1.2.4 1998/11/11 04:54:15 stanton Exp $)
      
      ReproducibleScript:
      #!/usr/bin/tclsh
      
      proc mySet {varName value} {
          upvar 1 $varName localVar
          set localVar $value
      }
      
      interp alias {} myNewSet {} mySet
      
      proc testMyNewSet {value} {
          myNewSet a $value
          return $a
      }
      
      testMyNewSet "hi"
      
      
      
      
      
      ObservedBehavior:
      can't read "a": no such variable
          while executing
      "return $a"
          (procedure "testMyNewSet" line 3)
          invoked from within
      "testMyNewSet "hi""
      
      
      
      
      DesiredBehavior:
      testMyNewSet should return "hi"
      
      
      
      
      
      
      Patch:
      *** generic/tclInterp.c Thu Dec  3 22:10:02 1998
      --- generic/tclInterp.c.new     Fri Dec  4 14:48:34 1998
      ***************
      *** 1407,1413 ****
            cmdPtr = Tcl_NewListObj(prefc, prefv);
            Tcl_ListObjReplace(NULL, cmdPtr, prefc, 0, objc - 1, objv + 1);
            Tcl_ListObjGetElements(NULL, cmdPtr, &cmdc, &cmdv);
      !     result = TclObjInvokeGlobal(targetInterp, cmdc, cmdv,
                  TCL_INVOKE_NO_TRACEBACK);
            Tcl_DecrRefCount(cmdPtr);
        
      --- 1407,1413 ----
            cmdPtr = Tcl_NewListObj(prefc, prefv);
            Tcl_ListObjReplace(NULL, cmdPtr, prefc, 0, objc - 1, objv + 1);
            Tcl_ListObjGetElements(NULL, cmdPtr, &cmdc, &cmdv);
      !     result = TclObjInvoke(targetInterp, cmdc, cmdv,
                  TCL_INVOKE_NO_TRACEBACK);
            Tcl_DecrRefCount(cmdPtr);
      
      
      
      
      PatchFiles:
      generic/tclInterp.c
      
      
      
      
      
      
      This is not a bug.  Aliases are supposed to be invoked at the global level, much like bindings.  I will update the documentation to reflect this clarification.
      
      We changed this - it will be the 8.0 behavior.  Backwards compatability prevails.  04/19/1999 18:19 - rjohnson -
      
      
      
    4. foundin initialized to: "obsolete: 8.1a2"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "69. Other"
    10. title initialized to: "Problems using upvar with aliased procs"
    11. type initialized to: "Bug"
  2. Ticket change [7ec5ec7505] (rid 97474) by welch on 2000-10-26 08:12:12:

    1. closedate changed to: "2000-10-26T01:12:12"
    2. closer changed to: "welch"
    3. priority changed to: "2"
    4. resolution changed to: "Fixed"
    5. status changed to: "Closed"
  3. Ticket change [b23aae8fcc] (rid 98297) by dgp on 2001-04-17 04:31:29:

    1. closedate changed to: "2001-04-16T21:31:29"
    2. closer changed to: "dgp"
    3. subsystem changed to: "20. [interp]"