* libltdl/ltdl.h, libltdl/ltdl.c (lt_dlinterface_free): New

function.
* doc/libtool.texi (User defined module data): Document it.
This commit is contained in:
Eric Blake 2005-11-25 18:42:28 +00:00 committed by Ralf Wildenhues
parent 96a89e9c51
commit a0d0a9adc0
4 changed files with 21 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2005-11-25 Eric Blake <ebb9@byu.net>,
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* libltdl/ltdl.h, libltdl/ltdl.c (lt_dlinterface_free): New
function.
* doc/libtool.texi (User defined module data): Document it.
2005-11-25 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* libltdl/m4/libtool.m4 [aix] <archive_expsym_cmds>

View File

@ -3849,6 +3849,10 @@ You supply an @var{id_string} and @var{iface} so that the resulting
returned by the iteration functions below.
@end deftypefun
@deftypefun void lt_dlinterface_free (@w{lt_dlinterface_id @var{iface}})
Release the data associated with @var{iface}.
@end deftypefun
@deftypefun int lt_dlhandle_map (@w{lt_dlinterface_id @var{iface}}, @w{int (*@var{func}) (lt_dlhandle @var{handle}, void * @var{data})}, @w{void * @var{data}})
For each module that matches @var{iface}, call the function
@var{func}. When writing the @var{func} callback function, the

View File

@ -2028,14 +2028,21 @@ lt_dlinterface_register (const char *id_string, lt_dlhandle_interface *iface)
{
interface_id->id_string = lt__strdup (id_string);
if (!interface_id->id_string)
FREE (interface_id);
FREE (interface_id);
else
interface_id->iface = iface;
interface_id->iface = iface;
}
return (lt_dlinterface_id) interface_id;
}
void lt_dlinterface_free (lt_dlinterface_id key)
{
lt__interface_id *interface_id = (lt__interface_id *)key;
FREE (interface_id->id_string);
FREE (interface_id);
}
void *
lt_dlcaller_set_data (lt_dlinterface_id key, lt_dlhandle handle, void *data)
{

View File

@ -111,6 +111,7 @@ typedef int lt_dlhandle_interface (lt_dlhandle handle, const char *id_string);
LT_SCOPE lt_dlinterface_id lt_dlinterface_register (const char *id_string,
lt_dlhandle_interface *iface);
LT_SCOPE void lt_dlinterface_free (lt_dlinterface_id key);
LT_SCOPE void * lt_dlcaller_set_data (lt_dlinterface_id key,
lt_dlhandle handle, void *data);
LT_SCOPE void * lt_dlcaller_get_data (lt_dlinterface_id key,