From b730fbc6b86d777e80856e997ddc56fc4a851769 Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Fri, 17 May 2013 01:20:39 -0400 Subject: Remove the dlopen() pointer from struct filedef. This pointer is almost never needed, and it increases the size of the filedef struct for all files (of which there are a huge number for large builds). Instead keep a bit field marking whether the file is a loaded object and if so call a new function to unload it. In load.c we keep a simple linked list of loaded objects (of which there will be very few typically) and their dlopen() pointers. --- makeint.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'makeint.h') diff --git a/makeint.h b/makeint.h index 9d351c9..72124ec 100644 --- a/makeint.h +++ b/makeint.h @@ -490,8 +490,8 @@ int guile_gmake_setup (const gmk_floc *flocp); /* Loadable object support. Sets to the strcached name of the loaded file. */ typedef int (*load_func_t)(const gmk_floc *flocp); -int load_file (const gmk_floc *flocp, const char **filename, int noerror, - void **dlp); +int load_file (const gmk_floc *flocp, const char **filename, int noerror); +void unload_file (const char *name); /* We omit these declarations on non-POSIX systems which define _POSIX_VERSION, because such systems often declare them in header files anyway. */ -- cgit v1.2.3