]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libltdl/ltdl.c: replace NULL with 0, remove unused system
authorThomas Tanner <tanner@ffii.org>
Wed, 2 Feb 2000 10:05:42 +0000 (10:05 +0000)
committerThomas Tanner <tanner@gmx.de>
Wed, 2 Feb 2000 10:05:42 +0000 (10:05 +0000)
  and app_private pointers from lt_dlhandle_t
* libltdl/ltdl.c (presym_add_list): new preloaded symbols
  don't need to be added to the end

* libltdl/ltdl.c (lt_dlgetdata, lt_dlsetdata): removed
* libltdl/ltdl.h: ditto
* doc/libtool.texi (libltdl interface): ditto

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

index 552d4473dcc21c2d28fad715b13012b205273ee9..0db740be85ee146a6bb817b037a490631257a6e6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2000-02-02  Thomas Tanner  <tanner@ffii.org>
+
+       * libltdl/ltdl.c: replace NULL with 0, remove unused system
+         and app_private pointers from lt_dlhandle_t
+       * libltdl/ltdl.c (presym_add_list): new preloaded symbols
+         don't need to be added to the end
+         
+       * libltdl/ltdl.c (lt_dlgetdata, lt_dlsetdata): removed
+       * libltdl/ltdl.h: ditto
+       * doc/libtool.texi (libltdl interface): ditto
+       
 2000-02-01  Thomas Tanner  <tanner@ffii.org>
 
        * ltmain.in: support -dlopen/dlpreopen for libraries
index 79fe6044fc8a20bf5a09a6c0316b92018dbf61b5..1a7c70c2e90bbf1cfca5138b17d0a36d337fb8b3 100644 (file)
@@ -3090,16 +3090,6 @@ directories.  Return 0 on success.
 Return the current user-defined library search path.
 @end deftypefun
 
-@deftypefun int lt_dlsetdata (lt_dlhandle @var{handle}, lt_ptr_t @var{data})
-Set the application private data for the module @var{handle} to @var{data}.
-Return 0 on success.
-@end deftypefun
-
-@deftypefun lt_ptr_t lt_dlgetdata (lt_dlhandle @var{handle})
-Return the application private data for the module @var{handle}.
-If the handle @var{handle} is invalid or no data was set, it returns @code{NULL}.
-@end deftypefun
-
 @deftypefun {const lt_dlinfo *} lt_dlgetinfo (lt_dlhandle @var{handle})
 Return a pointer to a struct that contains some information about
 the module @var{handle}.  The contents of the struct must not be modified.
index cab64addf7193456bbbc8d04fb577145f49d80d1..eb6e5d55ec6048f4d0cff5109929497d9871ecca 100644 (file)
@@ -124,8 +124,6 @@ typedef     struct lt_dlhandle_t {
        int     depcount;       /* number of dependencies */
        lt_dlhandle *deplibs;   /* dependencies */
        lt_syshandle handle;    /* system handle */
-       lt_ptr_t system;        /* system specific data */
-       lt_ptr_t app_private;   /* application private data */
 } lt_dlhandle_t;
 
 #undef strdup
@@ -519,7 +517,7 @@ sys_wll_open (filename)
 {
        lt_dlhandle cur;
        lt_syshandle handle;
-       char *searchname = NULL;
+       char *searchname = 0;
        char *ext = strrchr(filename, '.');
 
        if (ext) {
@@ -737,16 +735,8 @@ presym_add_symlist (preloaded)
                return 1;
        }
        tmp->syms = preloaded;
-       tmp->next = 0;
-       if (!preloaded_symbols)
-               preloaded_symbols = tmp;
-       else {
-               /* append to the end */
-               lists = preloaded_symbols;
-               while (lists->next)
-                       lists = lists->next;
-               lists->next = tmp;
-       }
+       tmp->next = preloaded_symbols;
+       preloaded_symbols = tmp;
        return 0;
 }
 
@@ -1094,7 +1084,7 @@ static char*
 canonicalize_path (path)
        const char *path;
 {
-       char *canonical = NULL;
+       char *canonical = 0;
        
        if (path && *path) {
                char *ptr = strdup (path);
@@ -1181,7 +1171,7 @@ find_file (basename, search_path, pdir, handle)
                                           memory overhead. */
                                        *pdir = filename;
                                } else
-                                       filename = NULL;
+                                       filename = 0;
                                result = (lt_ptr_t) file;
                                goto cleanup;
                        }
@@ -1590,7 +1580,6 @@ register_handle:
        }
        if (!handle->info.ref_count) {
                handle->info.ref_count = 1;
-               handle->app_private = 0;
                handle->info.name = name;
                handle->next = handles;
                handles = handle;
@@ -1823,30 +1812,6 @@ lt_dlgetsearchpath LTDL_PARAMS((void))
        return user_search_path;
 }
 
-int
-lt_dlsetdata (handle, data)
-       lt_dlhandle handle;
-       lt_ptr_t data;
-{
-       if (!handle) {
-               last_error = LT_DLSTRERROR(INVALID_HANDLE);
-               return 1;
-       }
-       handle->app_private = data;
-       return 0;
-}
-
-lt_ptr_t
-lt_dlgetdata (handle)
-       lt_dlhandle handle;
-{
-       if (!handle) {
-               last_error = LT_DLSTRERROR(INVALID_HANDLE);
-               return 0;
-       }
-       return handle->app_private;
-}
-
 const lt_dlinfo *
 lt_dlgetinfo (handle)
        lt_dlhandle handle;
index 8a161e88a72fb8dfeb1948eff057894f5ca80425..2e42c7f5a00700c4e7b5342f02f674814eb4cbfd 100644 (file)
@@ -193,8 +193,6 @@ extern const char *lt_dlerror LTDL_PARAMS((void));
 extern int lt_dladdsearchdir LTDL_PARAMS((const char *search_dir));
 extern int lt_dlsetsearchpath LTDL_PARAMS((const char *search_path));
 extern const char *lt_dlgetsearchpath LTDL_PARAMS((void));
-extern int lt_dlsetdata LTDL_PARAMS((lt_dlhandle handle, lt_ptr_t data));
-extern lt_ptr_t lt_dlgetdata LTDL_PARAMS((lt_dlhandle handle));
 extern const lt_dlinfo *lt_dlgetinfo LTDL_PARAMS((lt_dlhandle handle));
 extern int lt_dlforeach LTDL_PARAMS((
                int (*func)(lt_dlhandle handle, lt_ptr_t data), lt_ptr_t data));