+2000-02-21 Gary V. Vaughan <gary@oranda.demon.co.uk>
+
+ * libltdl/ltdl.c (lt_dlinit): removed unused variable, `loader'.
+
2000-02-03 Gary V. Vaughan <gary@oranda.demon.co.uk>
* libltdl/ltdl.h (lt_dlloader_data_t): New type for loader
const char *saved_error = last_error;
/* check whether the module was already opened */
- cur = handles;
- while (cur) {
- /* try to dlopen the program itself? */
- if (!cur->info.filename && !filename)
- break;
- if (cur->info.filename && filename &&
- strcmp(cur->info.filename, filename) == 0)
- break;
- cur = cur->next;
- }
+ cur = lt_find_dlhandle (filename);
if (cur) {
cur->info.ref_count++;
*handle = cur;
return 0;
}
+lt_dlhandle
+lt_find_dlhandle (filename)
+ const char *filename;
+{
+ lt_dlhandle cur = handles;
+
+ /* check whether the module was already opened */
+ while (cur) {
+ /* try to dlopen the program itself? */
+ if (!cur->info.filename && !filename)
+ break;
+ if (cur->info.filename && filename &&
+ strcmp(cur->info.filename, filename) == 0)
+ break;
+ cur = cur->next;
+ }
+
+ return cur;
+}
+
int
lt_dlclose (handle)
lt_dlhandle handle;