Tcl Source Code

View Ticket
Login
Ticket UUID: 218130
Title: TclpUnloadFile called, if initProc isn't found
Type: Bug Created on: 2000-10-26 00:53:29
Submitter: nobody Assigned to: nobody
Subsystem: 40. Dynamic Loading Severity:
Priority: 2 Last modified: 2001-04-18 06:24:27
Status: Closed Closed by: dgp
Resolution: Fixed Closed on: 2001-04-17 23:24:27
Version: obsolete: 8.1
Description:
OriginalBugID: 2006 RFE
Version: 8.1
SubmitDate: '1999-05-07'
LastModified: '2000-04-03'
Severity: MED
Status: Closed
Submitter: pat
ChangedBy: hobbs
OS: Linux
OSVersion: debian-Linux 2.2.6
Machine: Other
FixedDate: '2000-10-25'
ClosedDate: '2000-04-03'


Name:
Johannes Zellner

Extensions:
blt (frequently), expect, itcl & co (frequently), occasionally: tix, dp

DesiredBehavior:
in the new 8.1 generic/tclLoad.c the function TclpUnloadFile is called,
    if the initProc isn't found. This makes it impossible to load shared
    libs which were not intended to be used from tcl.
    Example: I use a small extension, which links the gnu readline to tcl.
    This needs of course the libreadline.so but also the libcurses.so or
    libtermcap.so to be loaded. (It worked pretty nice up to 8.0.5.)

Patch:
To solve this problem we'd need only to remove a single line from the
generic/tclLoad.c. I've put a patch to
http://www.zellner.org/tcl/tcl8.1-tclLoad.c.patch

PatchFiles:
generic/tclLoad.c



This isn't a problem when I used the Tcl readline extension with
8.3 (which still has that line of code).  The linker should
make the proper associations at link-time, not relying on Tcl.

There is another RFE to generically allow opening any sort of
library, which is an interesting idea, but for another purpose. 
-- 04/03/2000 hobbs