Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2010-11-13
00:33 • Ticket [2549621fff] interp create fails to normalize paths status still Op... artifact: a40d8f10a3 user: dgp
2009-01-31
00:24 • Ticket [2549621fff]: 4 changes artifact: 5234fb5f23 user: dgp
2009-01-30
16:57 • New ticket [2549621fff]. artifact: 221c128962 user: dgp

[interp create] fails to normalize paths

Open2549621fffffffffffffffffffffffffffffffffCreated 18 years agoUpdated 16 years ago
Descriptionplain2009-01-30 16:57:51
Interp paths are lists, but multiple
list-equal paths are accepted:

% interp create a
a
% interp create { a }
 a
% interp slaves
{ a } a
% interp create {a b}
a b
% interp create { a  b}
interpreter named "b" already exists, cannot create
% interp slaves
{ a } a
% interp slaves a
b
% interp slaves { a }
b

At least tricky, probably impossible
to gain full access to the slave
interp named { a }.

What a botch this is.
dgpplain2009-01-31 00:24:20
dgpyes, at least the biggest part of the problem is in [interp create] not consistently treating its path argument as a list.
dgpFirst it insists on a valid list.
dgpthen if the length of that list is >1 it uses the list value.
dgpIf the length is < 2, it treats the whole string value as if it were the first list element.

dgpthat's not the documented behavior
dgp"The name of the slave command is the last component of path."
dgpplain2010-11-13 00:33:54
PING!

Other folks on tkchat have finally noticed this.
Log in (anonymous is fine) to add a comment.