public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-577] go: use htab_eq_string in godump
@ 2021-05-06 14:51 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2021-05-06 14:51 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:861c6411ea70f18bf04c0b276a03af04636b9b3a

commit r12-577-g861c6411ea70f18bf04c0b276a03af04636b9b3a
Author: Tom Tromey <tom@tromey.com>
Date:   Wed Apr 28 18:47:15 2021 -0600

    go: use htab_eq_string in godump
    
    This changes godump to use the new htab_eq_string function.
    
    gcc
    
            * godump.c (string_hash_eq): Remove.
            (go_finish): Use htab_eq_string.

Diff:
---
 gcc/godump.c | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/gcc/godump.c b/gcc/godump.c
index 7864d9d63e5..cf998949035 100644
--- a/gcc/godump.c
+++ b/gcc/godump.c
@@ -109,14 +109,6 @@ macro_hash_del (void *v)
   XDELETE (mhv);
 }
 
-/* For the string hash tables.  */
-
-static int
-string_hash_eq (const void *y1, const void *y2)
-{
-  return strcmp ((const char *) y1, (const char *) y2) == 0;
-}
-
 /* A macro definition.  */
 
 static void
@@ -1374,11 +1366,11 @@ go_finish (const char *filename)
   real_debug_hooks->finish (filename);
 
   container.type_hash = htab_create (100, htab_hash_string,
-                                     string_hash_eq, NULL);
+				     htab_eq_string, NULL);
   container.invalid_hash = htab_create (10, htab_hash_string,
-					string_hash_eq, NULL);
+					htab_eq_string, NULL);
   container.keyword_hash = htab_create (50, htab_hash_string,
-                                        string_hash_eq, NULL);
+					htab_eq_string, NULL);
   obstack_init (&container.type_obstack);
 
   keyword_hash_init (&container);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-06 14:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-06 14:51 [gcc r12-577] go: use htab_eq_string in godump Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).