| Ticket UUID: | 1452058 | ||
| Title: | unload -keeplibrary prevents re-loading the extension | ||
| Type: | Bug | Created on: | 2006-03-17 08:19:31 |
| Submitter: | neoxed | Assigned to: | kennykb |
| Subsystem: | 40. Dynamic Loading | Severity: | |
| Priority: | 9 Immediate | Last modified: | 2006-03-24 05:18:39 |
| Status: | Deleted | Closed by: | neoxed |
| Resolution: | Duplicate | Closed on: | 2006-03-23 22:18:39 |
| Version: | obsolete: 8.5a4 | ||
| Description: | ||||
Tcl Version: 8.5a4
OS Version: Windows XP SP2
Once an extension is unloaded with -keeplibrary I'm
unable to load the extension again. This happens with
any extension, but I'll use the bundled registry one
to demonstrate.
Actual output:
LoadA: registry {registry tcl::tommath Tcl}
Unload: {} {tcl::tommath Tcl}
LoadB: {} {tcl::tommath Tcl}
Expected output:
LoadA: registry {registry tcl::tommath Tcl}
Unload: {} {tcl::tommath Tcl}
LoadB: registry {registry tcl::tommath Tcl}
When the load command is invoked afterwards (LoadB),
it seems Tcl does not call the package's Init()
procedure.
| ||||
| User Comments: | ||||
neoxed added on 2006-03-17 15:19:59:
File Added - 171235: unload.tcl neoxed added on 2006-03-20 12:23:29:
Logged In: YES user_id=1119750 After further investigation, the problem occurs at lines ~255-260 in tclLoad.c. The load command will search through a list of loaded packages, and if the package is already loaded it returns. Since the package is unloaded with -keeplibrary, it's entry remains in the package list. dgp added on 2006-03-23 10:39:44:
Logged In: YES user_id=80530 how is this related to 1111134 ? neoxed added on 2006-03-24 05:18:39:
Logged In: YES user_id=1119750 My mistake, this is a duplicate of 1111134. I searched for "-keeplibrary" and no results were returned, so I assumed this issue had never been mentioned. | ||||
Attachments:
- unload.tcl [download] added by neoxed on 2006-03-17 15:19:31. [details]
