|
2011-03-10
| ||
| 03:58 | • Closed ticket [3202171fff]: namespace code simplification incorrect plus 7 o... artifact: 2a81d3fcd3 user: dgp | |
|
2011-03-09
| ||
| 23:10 | • Ticket [3202171fff]: 5 changes artifact: e5e8bde3c9 user: dkf | |
| 22:00 | • Ticket [3202171fff]: 5 changes artifact: de9bcdc14f user: dgp | |
| 04:12 | • Ticket [3202171fff]: 4 changes artifact: 0e48bc2624 user: dgp | |
|
2011-03-08
| ||
| 03:22 | • Ticket [3202171fff]: 4 changes artifact: 144938e102 user: dgp | |
| 03:19 | • Ticket [3202171fff]: 4 changes artifact: 7113028e89 user: dgp | |
|
2011-03-07
| ||
| 20:17 | • New ticket [3202171fff]. artifact: 646efd07f6 user: dgp | |
namespace code simplification incorrect
Closed / Fixed3202171fffffffffffffffffffffffffffffffffCreated 16 years agoUpdated 16 years ago
Descriptionplain2011-03-07 20:17:58
Demo script:
% namespace eval demo {
proc namespace args {puts $args}
::namespace code {namespace inscope foo}
}
namespace inscope foo
[::namespace code] tries to detect and simplify cases where
it would produce nested [::namespace inscope] calls. In the
case where a namespace has its own custom "namespace"
command, though, this is not correct.
dgpplain2011-03-08 03:19:26
There is also a more fundamental design flaw that the functioning of [namespace code] appears to rely on an assumption that the [::namespace] command is never [rename]d.
dgpplain2011-03-08 03:22:00
Since there's no way I can think of to deal with the possibility of the renaming of commands between the time [namespace code] quotes a script, and the time the quoted script is eval's by a callback operation, that weakness may just have to be accepted. The bug demo submitted ought to be fixable though.
dgpplain2011-03-09 04:12:59
Note, this analysis also implies that tests namespace-22.2 and namespace-22.3 are incorrect.
dgpplain2011-03-09 22:00:00
Fix is in checkin http://core.tcl.tk/tcl/info/ac4c249ecf Please review, and if acceptable, either merge to core branch, or give me the ok to do so.
dkfplain2011-03-09 23:10:08
Looks OK to me
dgpplain2011-03-10 03:58:16
allow_comments - 1 committed.
Log in (anonymous is fine) to add a comment.