mirror of
git://git.savannah.gnu.org/libtool.git
synced 2024-11-21 01:40:57 +08:00
* libltdl/ltdl.c (lt_dlhandle_find): New function to find a handle
by module name. * libltdl/ltdl.h (lt_dlhandle_find): Declare it. * doc/libtool.texi (User defined module data): Document it. * NEWS: Updated.
This commit is contained in:
parent
fe6fb50bc3
commit
9b5a0f038d
@ -1,3 +1,11 @@
|
||||
2003-11-18 Gary V. Vaughan <gary@gnu.org>
|
||||
|
||||
* libltdl/ltdl.c (lt_dlhandle_find): New function to find a handle
|
||||
by module name.
|
||||
* libltdl/ltdl.h (lt_dlhandle_find): Declare it.
|
||||
* doc/libtool.texi (User defined module data): Document it.
|
||||
* NEWS: Updated.
|
||||
|
||||
2003-11-17 Gary V. Vaughan <gary@gnu.org>
|
||||
|
||||
* m4/libtool.m4 (AC_LIBTOOL_SETUP): Uncomment call to
|
||||
|
2
NEWS
2
NEWS
@ -22,6 +22,8 @@ New in 1.5b: 2003-??-??; CVS version 1.5a, Libtool team:
|
||||
* Mode inferrence removed, shorthand for choosing modes added.
|
||||
* Specifying -allow-undefined is now an error.
|
||||
* Speed up max_cmd_len check.
|
||||
* New function in libltdl: lt_dlhandle_find provides access to module handles
|
||||
by module name.
|
||||
* make install now deletes preexisting $prefix/share/libtool before installing
|
||||
latest files.
|
||||
* Extracting symbols from an import library on cygwin and win32 now works.
|
||||
|
@ -3199,6 +3199,12 @@ If @var{place} is the last element in the list of loaded modules, this
|
||||
function returns @code{NULL}.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun lt_dlhandle lt_dlhandle_find (@w{const char *@var{module_name}})
|
||||
Search through the loaded module handles for a module named
|
||||
@var{module_name}, returning its handle if found or else @code{NULL}
|
||||
if no such named module has been loaded.
|
||||
@end deftypefun
|
||||
|
||||
Of course, you would still need to maintain your own list of loaded
|
||||
module handles to parallel the list maintained by libltdl if there are
|
||||
any other data that you need to associate with each handle for the
|
||||
|
@ -4130,6 +4130,25 @@ lt_dlhandle_next (place)
|
||||
return place ? place->next : handles;
|
||||
}
|
||||
|
||||
lt_dlhandle
|
||||
lt_dlhandle_find (module_name)
|
||||
const char *module_name;
|
||||
{
|
||||
lt_dlhandle cur = handles;
|
||||
|
||||
if (cur)
|
||||
{
|
||||
do
|
||||
{
|
||||
if (cur->info.name && strcmp (cur->info.name, module_name) == 0)
|
||||
break;
|
||||
}
|
||||
while ((cur = cur->next));
|
||||
}
|
||||
|
||||
return cur;
|
||||
}
|
||||
|
||||
int
|
||||
lt_dlforeach (func, data)
|
||||
int (*func) LT_PARAMS((lt_dlhandle handle, lt_ptr data));
|
||||
|
@ -242,6 +242,8 @@ typedef struct {
|
||||
|
||||
LT_SCOPE const lt_dlinfo *lt_dlgetinfo LT_PARAMS((lt_dlhandle handle));
|
||||
LT_SCOPE lt_dlhandle lt_dlhandle_next LT_PARAMS((lt_dlhandle place));
|
||||
LT_SCOPE lt_dlhandle lt_dlhandle_find LT_PARAMS((
|
||||
const char *module_name));
|
||||
LT_SCOPE int lt_dlforeach LT_PARAMS((
|
||||
int (*func) (lt_dlhandle handle, lt_ptr data),
|
||||
lt_ptr data));
|
||||
|
Loading…
Reference in New Issue
Block a user