Tcl_UpVar(2)? and behaviour contrary to the docs
Closed / Fixed1574099fffffffffffffffffffffffffffffffffCreated 20 years agoUpdated 20 years ago
Descriptionplain2006-10-09 22:26:43
Ever since Tcl8.0, the documentation of Tcl_UpVar says about the flags: "Either TCL_GLOBAL_ONLY or 0; if non-zero, then destName is a global variable; otherwise it is a local to the current procedure (or global if no procedure is active)." Code comments, the procedure TestupvarCmd() and var-3.4 however say that TCL_NAMESPACE_ONLY is also accepted. A codesearch in google shows no users of any flag value other than 0 and TCL_GLOBAL_ONLY. Either the docs or the code requiring changing so that they agree. A priori, I would change the docs: even if unused, the ns-only flag value could be useful. OTOH, this is a *POTENTIAL INCOMPAT* - for anybody who would be relying on flags!=0 <=> flags==TCL_GLOBAL_ONLY Opinion?
dkfplain2006-10-10 05:46:43
Logged In: YES user_id=79902 If the implementation has been that way for ages, might as well document it.
msoferplain2006-10-10 06:40:16
Logged In: YES user_id=148712 Agreed - no real incompatibility, anybody relying on the docs would have found it already.
msofer Ticket [1574099fff]: 4 changes
[History diff]2006-10-10 06:40:17
dgpplain2006-10-10 20:07:45
Logged In: YES user_id=80530 Looks like a doc update that was overlooked at the Tcl 7 -> 8 transition.
Log in (anonymous is fine) to add a comment.