From: Thomas Tanner Date: Wed, 2 Feb 2000 10:05:42 +0000 (+0000) Subject: * libltdl/ltdl.c: replace NULL with 0, remove unused system X-Git-Tag: release-1-3d~203 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=112b7cb29f62095efe26b7314ef2e0ea17dc2cf2;p=thirdparty%2Flibtool.git * 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 --- diff --git a/ChangeLog b/ChangeLog index 552d4473d..0db740be8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2000-02-02 Thomas Tanner + + * 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 * ltmain.in: support -dlopen/dlpreopen for libraries diff --git a/doc/libtool.texi b/doc/libtool.texi index 79fe6044f..1a7c70c2e 100644 --- a/doc/libtool.texi +++ b/doc/libtool.texi @@ -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. diff --git a/libltdl/ltdl.c b/libltdl/ltdl.c index cab64addf..eb6e5d55e 100644 --- a/libltdl/ltdl.c +++ b/libltdl/ltdl.c @@ -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; diff --git a/libltdl/ltdl.h b/libltdl/ltdl.h index 8a161e88a..2e42c7f5a 100644 --- a/libltdl/ltdl.h +++ b/libltdl/ltdl.h @@ -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));