Skip to content
Tcl Source Code View Ticket
Login

View Ticket

] and Tcl_ScanCountedElement vs Tcl_ConvertCountedElement

Closed / Out of Date2771472fffffffffffffffffffffffffffffffffCreated 18 years agoUpdated 14 years ago
Descriptionplain2009-04-17 21:52:50
Tcl_ConvertCountedElement DOES look for ]'s and escapes them...

Tcl_ScanCountedElement DOES NOT look for ]'s when its guess how many things need to be escaped.

So which is it ?

I am not sure why ]s are escaped to begin with.  I understand [....
If I had it my way, ] would not be escaped.

If we can't change the behaviour (leave ] escaping)....
please have Tcl_ScanCountedElement account for it.
dgp Ticket [2771472fff]: 1 change [History diff]2009-04-20 21:16:35
dgpplain2012-05-01 23:45:18
I think this is long-fixed on the active
branches.  Please confirm.

As mentioned in the code comments now:

 * * It is also guaranteed that one can use a canonical list as a building
 *   block of a larger script within command substitution, as in this example:
 *      set script "puts \[[list $cmd $arg]]"; eval $script
 *   To support this usage, any appearance of the character
 *              \u005d  ]       CLOSE BRACKET
 *   in a list element must be BRACEd, QUOTEd, or escaped.
dgpplain2012-06-05 21:03:38
allow_comments - 1
Log in (anonymous is fine) to add a comment.