Skip to content
Tcl Source Code History Of Ticket 577033ffffffffff
Login

History Of Ticket 577033ffffffffff

Artifacts Associated With Ticket 577033ffffffffff

  1. Ticket change [94c3d7c33c] (rid 106048) by vincentdarley on 2002-07-03 16:07:02:

    1. assignee initialized to: "dgp"
    2. cmimetype initialized to: "text/plain"
    3. 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.
      
      
    4. foundin initialized to: "obsolete: 8.4a5"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "vincentdarley"
    9. subsystem initialized to: "38. Init - Library - Autoload"
    10. title initialized to: "tcl_findLibrary sets 'varName' on fail"
    11. type initialized to: "Bug"
  2. Ticket change [b746b0e354] (rid 125559) by dgp on 2002-07-03 23:34:45:

    1. 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.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  3. Ticket change [e28f41cbbd] (rid 87652) by dgp on 2002-07-03 23:52:39:

    1. icomment:
      
      
      File Added - 26336: 577033.patch
      
      Logged In: YES 
      user_id=80530
      
      
      Does this patch solve the problem?
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  4. Add attachment "577033.patch" [2b2aec7583] (rid 118693) by dgp on 2002-07-03 23:52:39.

  5. Ticket change [a4dbf0879b] (rid 110274) by vincentdarley on 2002-07-04 00:00:54:

    1. icomment:
      Logged In: YES 
      user_id=32170
      
      That definitely looks like the right solution.  A direct 
      test seems to show it works -- Thanks!
      
      
      
      
    2. login: "vincentdarley"
    3. mimetype: "text/plain"
    4. username: "vincentdarley"
  6. Ticket change [b9b1e63cab] (rid 129196) by dgp on 2002-07-04 03:14:32:

    1. closedate changed to: "2002-07-03T20:14:32"
    2. closer changed to: "dgp"
    3. icomment:
      Logged In: YES 
      user_id=80530
      
      fix committed to HEAD and 8.3 branch
      
      
    4. login: "dgp"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "dgp"