This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: convert cpplib to use libiberty's hash tables
- To: Zack Weinberg <zack at wolery dot cumb dot org>
- Subject: Re: convert cpplib to use libiberty's hash tables
- From: Jason Merrill <jason at cygnus dot com>
- Date: 15 Mar 2000 13:54:31 -0800
- Cc: gcc-patches at gcc dot gnu dot org
- References: <20000312154423.F15697@wolery.cumb.org>
I applied this small fix, to reflect the recent change to the hashtable
interface.
2000-03-15 Jason Merrill <jason@casey.cygnus.com>
* cpphash.c (dump_hash_helper): Take the slot, not the element.
Index: cpphash.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cpphash.c,v
retrieving revision 1.57
diff -c -p -r1.57 cpphash.c
*** cpphash.c 2000/03/15 18:46:09 1.57
--- cpphash.c 2000/03/15 21:50:29
*************** Foundation, 59 Temple Place - Suite 330,
*** 33,39 ****
static unsigned int hash_HASHNODE PARAMS ((const void *));
static int eq_HASHNODE PARAMS ((const void *, const void *));
static void del_HASHNODE PARAMS ((void *));
! static int dump_hash_helper PARAMS ((void *, void *));
static int comp_def_part PARAMS ((int, U_CHAR *, int, U_CHAR *,
int, int));
--- 33,39 ----
static unsigned int hash_HASHNODE PARAMS ((const void *));
static int eq_HASHNODE PARAMS ((const void *, const void *));
static void del_HASHNODE PARAMS ((void *));
! static int dump_hash_helper PARAMS ((void **, void *));
static int comp_def_part PARAMS ((int, U_CHAR *, int, U_CHAR *,
int, int));
*************** _cpp_dump_definition (pfile, sym, len, d
*** 1722,1731 ****
/* Dump out the hash table. */
static int
dump_hash_helper (h, p)
! void *h;
void *p;
{
! HASHNODE *hp = (HASHNODE *)h;
cpp_reader *pfile = (cpp_reader *)p;
if (hp->type == T_MACRO)
--- 1722,1731 ----
/* Dump out the hash table. */
static int
dump_hash_helper (h, p)
! void **h;
void *p;
{
! HASHNODE *hp = (HASHNODE *)*h;
cpp_reader *pfile = (cpp_reader *)p;
if (hp->type == T_MACRO)