|
2006-11-04
| ||
| 06:25 | • Closed ticket [1590232fff]: error in cmd traces & aliases plus 3 other c... artifact: f1de4f2be4 user: msofer | |
| 06:14 | • Ticket [1590232fff]: 4 changes artifact: 3a96729018 user: msofer | |
| 06:14 | • Add attachment trace.patch to ticket [1590232fff] artifact: dcb13142a3 user: msofer | |
|
2006-11-03
| ||
| 23:14 | • New ticket [1590232fff] error in cmd traces & aliases. artifact: a5c285ab0d user: msofer | |
error in cmd traces & aliases
Closed / Fixed1590232fffffffffffffffffffffffffffffffffCreated 20 years agoUpdated 20 years ago
Descriptionplain2006-11-03 23:14:19
Aliases resolve command names in the global namespace,
but execute in the caller's scope. In the presence of
traces that cause a second resolution, the second time
the resolution proceeds in caller scope instead of global:
mig@ice:~$ cat /tmp/trace
set res {}
proc x {} {return ::}
namespace eval a {}
proc a::x {} {return ::a}
interp alias {} y {} x
lappend res [namespace eval a y]
trace add execution x enter {
rename ::x {}
proc ::x {} {return ::}
#}
lappend res [namespace eval a y]
puts $res
mig@ice:~$ /home/CVS/tcl8.5a5/unix/tclsh /tmp/trace
:: ::a
Correct behaviour is restored with the attached patch,
returning
:: ::
msoferplain2006-11-04 06:14:19
File Added - 201334: trace.patch
msofer Closed ticket [1590232fff].
[History diff]2006-11-04 06:25:56
Log in (anonymous is fine) to add a comment.
Attachments:
- trace.patch [download] added by msofer on 2006-11-04 06:14:19. [details]