Artifacts Associated With Ticket 577033ffffffffffffffffffffffffffffffffff
Ticket change [94c3d7c33c] (rid 106048) by vincentdarley on 2002-07-03 16:07:02:
- assignee initialized to: "dgp"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Basic problem: tcl_findLibrary is supposed to set the variable $varName to the directory containing a specific file, if that file is successfully found and sourced. However, if the procedure is unable to find the file, it still sets $varName to the last location that was looked at. This can have unfortunate side effects... Example of the problem: If any extension wants to call tcl_findLibrary twice (because, perhaps for legacy reasons, the pkg.tcl file it is looking for could be in two different places), then between the two calls, a 'Tcl_UnsetVar (..., "myPkgVar", TCL_GLOBAL_ONLY) is required. Otherwise the first call to tcl_findLibrary (which we will assume fails) leaves myPkgVar set to the last directory that was looked at, and then the second call to tcl_findLibrary will only examine that location. Suggested solution: Either this constraint should be documented or tcl_findLibrary should be fixed so that if '$varName' doesn't exist when it is called, then if the procedure fails, '$varName' should also not exist when the procedure returns.
- foundin initialized to: "obsolete: 8.4a5"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "vincentdarley"
- subsystem initialized to: "38. Init - Library - Autoload"
- title initialized to: "tcl_findLibrary sets 'varName' on fail"
- type initialized to: "Bug"
Ticket change [b746b0e354] (rid 125559) by dgp on 2002-07-03 23:34:45:
- icomment:
Logged In: YES user_id=80530 I agree this is a bug. There's some trickiness involved in fixing it. If $varName originally exists, we do not want to unset it, even if initialization fails. Also $varName must be set during the [source] of $initScript.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [e28f41cbbd] (rid 87652) by dgp on 2002-07-03 23:52:39:
- icomment:
File Added - 26336: 577033.patch Logged In: YES user_id=80530 Does this patch solve the problem?
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Add attachment "577033.patch" [2b2aec7583] (rid 118693) by dgp on 2002-07-03 23:52:39.
Ticket change [a4dbf0879b] (rid 110274) by vincentdarley on 2002-07-04 00:00:54:
- icomment:
Logged In: YES user_id=32170 That definitely looks like the right solution. A direct test seems to show it works -- Thanks!
- login: "vincentdarley"
- mimetype: "text/plain"
- username: "vincentdarley"
- icomment:
Ticket change [b9b1e63cab] (rid 129196) by dgp on 2002-07-04 03:14:32:
- closedate changed to: "2002-07-03T20:14:32"
- closer changed to: "dgp"
- icomment:
Logged In: YES user_id=80530 fix committed to HEAD and 8.3 branch
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "dgp"