From: SourceForge.net <no...@so...> - 2004-05-23 22:48:51
|
Bugs item #959052, was opened at 2004-05-23 17:10 Message generated for change (Comment added) made by msofer You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=959052&group_id=10894 Category: 07. Variables Group: None Status: Open >Resolution: Fixed Priority: 5 Submitted By: miguel sofer (msofer) >Assigned to: Jeffrey Hobbs (hobbs) Summary: variable name resolution and unset vars Initial Comment: Name resolution for variablesin namespaces sometimes finds variables that "do not exist" according to [info vars]. % namespace eval a upvar x q % info vars x % namespace eval b set x 1 1 % set x 1 % trace add variable x write {;#} % info vars x % namespace eval a set x 1 1 % set x 1 % namespace eval a {trace add variable x write {;#}} % set x 0 0 % info vars a::x % namespace eval a set x 1 1 % set x 0 % info vars a::x ::a::x The variables which are found contrary to [info vars] satisfy: - they have an entry in their namespace's hash table - they are unset, ie (varPtr->flags & VAR_UNDEFINED) - they are not namespace variables, ie !(varPtr->flags & VAR_NAMESPACE_VAR) ---------------------------------------------------------------------- >Comment By: miguel sofer (msofer) Date: 2004-05-23 19:48 Message: Logged In: YES user_id=148712 Attaching a patch, already committed to HEAD. Please review for itcl compat. Are there any other known users of Tcl_FindNamespaceVar that may rely on the weird lookup semantics? Second Q: should this be backported to 8.4? 8.3? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=959052&group_id=10894 |