]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libltdl/ltdl.h, libltdl/ltdl.c (lt_dlinterface_free): New
authorEric Blake <ebb9@byu.net>
Fri, 25 Nov 2005 18:42:28 +0000 (18:42 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Fri, 25 Nov 2005 18:42:28 +0000 (18:42 +0000)
function.
* doc/libtool.texi (User defined module data): Document it.

ChangeLog
doc/libtool.texi
libltdl/ltdl.c
libltdl/ltdl.h

index 156e5ccf08dbda06d9e691144af0dc43622a7a3a..58c94a77e14d5356c5c4896ab8c6b288d35c5c56 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
index 06bb9a26629945f5ec7eb72e7a4602fecbf118af..37ada9957826fd87301d0c4bc610d6558311b1bb 100644 (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
index 77a7ffeb0d6efc4ece23fb5f22649a63f027b541..3c265a3528c8fb210e10575b3c8159828fb14fc1 100644 (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)
 {
index 9135735a802833debe93ea0ed65efaff1a57584d..ecf3fe1d6acde57c64c2ea3902854c9175fc4df1 100644 (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,