Artifacts Associated With Ticket 218015
Ticket change [d1b15aed88] (rid 113397) by nobody on 2000-10-26 00:52:12:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- 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 - - foundin initialized to: "obsolete: 8.1a2"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "69. Other"
- title initialized to: "Problems using upvar with aliased procs"
- type initialized to: "Bug"
Ticket change [7ec5ec7505] (rid 97474) by welch on 2000-10-26 08:12:12:
- closedate changed to: "2000-10-26T01:12:12"
- closer changed to: "welch"
- priority changed to: "2"
- resolution changed to: "Fixed"
- status changed to: "Closed"
Ticket change [b23aae8fcc] (rid 98297) by dgp on 2001-04-17 04:31:29:
- closedate changed to: "2001-04-16T21:31:29"
- closer changed to: "dgp"
- subsystem changed to: "20. [interp]"