diff options
author | Akim Demaille <akim.demaille@gmail.com> | 2021-02-25 08:31:50 +0100 |
---|---|---|
committer | Akim Demaille <akim.demaille@gmail.com> | 2021-02-26 07:16:57 +0100 |
commit | f6eb1ac87bd08f2231fc28b14129c1b458da3bdf (patch) | |
tree | d9fe71230f475d1ee697a8618142c6982403ceec /lib | |
parent | b96528b48c7524f093a65a39a1601e98a9e031a4 (diff) | |
download | bison-f6eb1ac87bd08f2231fc28b14129c1b458da3bdf.tar.gz |
output: cache the mapped file names
Don't repeatedly call malloc/free for each call to map_file_name.
* bootstrap.conf: We need hash-map.
* src/files.h, src/files.c (map_file_name): The caller must not free
the result.
Adjust callers.
(mapped_dir_prefix, spec_mapped_header_file): Remove.
* src/files.c
(map_file_name): Rename as...
(map_file_name_alloc): this.
(mapped_files, map_file_name, string_equals, string_hash, string_free):
New.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/.gitignore | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/.gitignore b/lib/.gitignore index 5d7f60e5..00843d68 100644 --- a/lib/.gitignore +++ b/lib/.gitignore @@ -162,10 +162,14 @@ /gl_anytreehash_list2.h /gl_array_list.c /gl_array_list.h +/gl_hash_map.c +/gl_hash_map.h /gl_linked_list.c /gl_linked_list.h /gl_list.c /gl_list.h +/gl_map.c +/gl_map.h /gl_oset.c /gl_oset.h /gl_rbtree_ordered.h @@ -175,6 +179,8 @@ /gl_rbtreehash_list.h /gl_xlist.c /gl_xlist.h +/gl_xmap.c +/gl_xmap.h /gnulib.mk /hard-locale.c /hard-locale.h |