diff options
author | Paul Smith <psmith@gnu.org> | 2013-05-17 01:20:39 -0400 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2013-05-17 01:20:39 -0400 |
commit | 173fd48b743a6eb85271d62dae0be1ca025d5d76 (patch) | |
tree | 9ca4f2aae6b0f5d8669c7990f3b2f50f22cd1780 /read.c | |
parent | b7041cbb385e9a35a6ba2da69bf9cffbce678eee (diff) | |
download | make-173fd48b743a6eb85271d62dae0be1ca025d5d76.tar.gz |
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.
Diffstat (limited to 'read.c')
-rw-r--r-- | read.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -937,12 +937,11 @@ eval (struct ebuffer *ebuf, int set_default) struct nameseq *next = files->next; const char *name = files->name; struct dep *deps; - void *dlp; free_ns (files); files = next; - if (! load_file (&ebuf->floc, &name, noerror, &dlp) && ! noerror) + if (! load_file (&ebuf->floc, &name, noerror) && ! noerror) fatal (&ebuf->floc, _("%s: failed to load"), name); deps = alloc_dep (); @@ -951,7 +950,7 @@ eval (struct ebuffer *ebuf, int set_default) deps->file = lookup_file (name); if (deps->file == 0) deps->file = enter_file (name); - deps->file->dlopen_ptr = dlp; + deps->file->loaded = 1; } continue; |