Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2011-06-21
21:11 • Closed ticket [3317466fff]: Tcl_LinkVar should prevent duplicates plus 8 oth... artifact: 5897ec4f5a user: dgp
21:11 • Ticket [3317466fff]: 4 changes artifact: f2107b4254 user: dgp
2011-06-17
05:44 • Ticket [3317466fff]: 4 changes artifact: 8109bb4ed9 user: ferrieux
2011-06-16
18:58 • New ticket [3317466fff]. artifact: cc840ac19c user: dgp

Tcl_LinkVar should prevent duplicates

Closed / Fixed3317466fffffffffffffffffffffffffffffffffCreated 15 years agoUpdated 15 years ago
Descriptionplain2011-06-16 18:58:52
The whole tclLink.c file relies on a constraint
that a Tcl variable is only linked to one C variable
at a time.  However, Tcl_LinkVar() does nothing
to detect and prevent violations of this constraint.

Detection is easy.  Prevention could take two
forms.  Either raise an error, or let the second
Tcl_LinkVar() call on the same Tcl variable
implicitly Tcl_UnlinkVar() any previous link that's
already in place.
ferrieuxplain2011-06-17 05:44:43
Since changing the link's target sounds highly unlikely, flag it as an error.
dgpplain2011-06-21 21:11:47
fix committed.
dgpplain2011-06-21 21:11:48
allow_comments - 1
Log in (anonymous is fine) to add a comment.