It's (PCH) merging time!

DJ Delorie dj@redhat.com
Tue Jun 4 12:31:00 GMT 2002


> OK.  So, how about this patch?

That would be fine.  Two comments, esp since you deleted
htab_try_create completely without even providing a #define (which is
not even source-wise backwards compatible):

1. The prototypes should go back in hashtab.h (before the #defines).

2. Your comment is a bit harsh.  It need only say "These functions are
   for backwards compatibility".  Ditto the ChangeLog entry.

> -- 
> - Geoffrey Keating <geoffk@geoffk.org> <geoffk@redhat.com>
> 
> ===File ~/patches/cygnus/pch-libibertyback.patch============
> 2002-06-04  Geoffrey Keating  <geoffk@redhat.com>
> 
> 	* hashtab.c (htab_create): New stub function for backwards
> 	binary compatibility.
> 	(htab_try_create): Likewise.
> 
> Index: hashtab.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/libiberty/hashtab.c,v
> retrieving revision 1.27
> diff -p -u -p -r1.27 hashtab.c
> --- hashtab.c	4 Jun 2002 07:11:05 -0000	1.27
> +++ hashtab.c	4 Jun 2002 19:15:17 -0000
> @@ -191,6 +191,32 @@ htab_create_alloc (size, hash_f, eq_f, d
>    return result;
>  }
>  
> +/* These functions exist solely for backwards binary compatibility.  */
> +
> +#undef htab_create
> +extern htab_t htab_create PARAMS ((size_t, htab_hash, htab_eq, htab_del));
> +extern htab_t htab_try_create PARAMS ((size_t, htab_hash, htab_eq, htab_del));
> +
> +htab_t
> +htab_create (size, hash_f, eq_f, del_f)
> +     size_t size;
> +     htab_hash hash_f;
> +     htab_eq eq_f;
> +     htab_del del_f;
> +{
> +  return htab_create_alloc (size, hash_f, eq_f, del_f, xcalloc, free);
> +}
> +
> +htab_t
> +htab_try_create (size, hash_f, eq_f, del_f)
> +     size_t size;
> +     htab_hash hash_f;
> +     htab_eq eq_f;
> +     htab_del del_f;
> +{
> +  return htab_create_alloc (size, hash_f, eq_f, del_f, calloc, free);
> +}
> +
>  /* This function frees all memory allocated for given hash table.
>     Naturally the hash table must already exist. */
>  
> ============================================================
> 



More information about the Gcc-patches mailing list