mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
gnulib: update
Contains the creation of the xhash module. https://lists.gnu.org/archive/html/bug-gnulib/2019-09/msg00046.html * src/muscle-tab.c, src/state.c, src/symtab.c, src/uniqstr.c: Use hash_xinitialize.
This commit is contained in:
@@ -25,7 +25,7 @@ gnulib_modules='
|
||||
error extensions fdl fopen-safer
|
||||
getopt-gnu
|
||||
gettext-h git-version-gen gitlog-to-changelog
|
||||
gpl-3.0 hash inttypes isnan javacomp-script
|
||||
gpl-3.0 inttypes isnan javacomp-script
|
||||
javaexec-script
|
||||
ldexpl
|
||||
libtextstyle-optional
|
||||
@@ -48,6 +48,7 @@ gnulib_modules='
|
||||
xalloc
|
||||
xalloc-die
|
||||
xconcat-filename
|
||||
xhash
|
||||
xlist
|
||||
xmemdup0
|
||||
xstrndup
|
||||
|
||||
2
gnulib
2
gnulib
Submodule gnulib updated: 03add7eb9d...672663aca3
1
lib/.gitignore
vendored
1
lib/.gitignore
vendored
@@ -321,3 +321,4 @@
|
||||
/assure.h
|
||||
/fsync.c
|
||||
/textstyle.in.h
|
||||
/xhash.c
|
||||
|
||||
@@ -126,10 +126,8 @@ muscle_init (void)
|
||||
/* Initialize the muscle obstack. */
|
||||
obstack_init (&muscle_obstack);
|
||||
|
||||
muscle_table = hash_initialize (HT_INITIAL_CAPACITY, NULL, hash_muscle,
|
||||
hash_compare_muscles, muscle_entry_free);
|
||||
if (!muscle_table)
|
||||
xalloc_die ();
|
||||
muscle_table = hash_xinitialize (HT_INITIAL_CAPACITY, NULL, hash_muscle,
|
||||
hash_compare_muscles, muscle_entry_free);
|
||||
|
||||
/* Version and input file. */
|
||||
MUSCLE_INSERT_STRING ("version", VERSION);
|
||||
|
||||
12
src/state.c
12
src/state.c
@@ -359,13 +359,11 @@ state_hasher (void const *s, size_t tablesize)
|
||||
void
|
||||
state_hash_new (void)
|
||||
{
|
||||
state_table = hash_initialize (HT_INITIAL_CAPACITY,
|
||||
NULL,
|
||||
state_hasher,
|
||||
state_comparator,
|
||||
NULL);
|
||||
if (!state_table)
|
||||
xalloc_die ();
|
||||
state_table = hash_xinitialize (HT_INITIAL_CAPACITY,
|
||||
NULL,
|
||||
state_hasher,
|
||||
state_comparator,
|
||||
NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
24
src/symtab.c
24
src/symtab.c
@@ -779,20 +779,16 @@ hash_semantic_type_hasher (void const *m, size_t tablesize)
|
||||
void
|
||||
symbols_new (void)
|
||||
{
|
||||
symbol_table = hash_initialize (HT_INITIAL_CAPACITY,
|
||||
NULL,
|
||||
hash_symbol_hasher,
|
||||
hash_symbol_comparator,
|
||||
symbol_free);
|
||||
if (!symbol_table)
|
||||
xalloc_die ();
|
||||
semantic_type_table = hash_initialize (HT_INITIAL_CAPACITY,
|
||||
NULL,
|
||||
hash_semantic_type_hasher,
|
||||
hash_semantic_type_comparator,
|
||||
free);
|
||||
if (!semantic_type_table)
|
||||
xalloc_die ();
|
||||
symbol_table = hash_xinitialize (HT_INITIAL_CAPACITY,
|
||||
NULL,
|
||||
hash_symbol_hasher,
|
||||
hash_symbol_comparator,
|
||||
symbol_free);
|
||||
semantic_type_table = hash_xinitialize (HT_INITIAL_CAPACITY,
|
||||
NULL,
|
||||
hash_semantic_type_hasher,
|
||||
hash_semantic_type_comparator,
|
||||
free);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -157,13 +157,11 @@ hash_uniqstr (void const *m, size_t tablesize)
|
||||
void
|
||||
uniqstrs_new (void)
|
||||
{
|
||||
uniqstrs_table = hash_initialize (HT_INITIAL_CAPACITY,
|
||||
NULL,
|
||||
hash_uniqstr,
|
||||
hash_compare_uniqstr,
|
||||
free);
|
||||
if (!uniqstrs_table)
|
||||
xalloc_die ();
|
||||
uniqstrs_table = hash_xinitialize (HT_INITIAL_CAPACITY,
|
||||
NULL,
|
||||
hash_uniqstr,
|
||||
hash_compare_uniqstr,
|
||||
free);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user