Skip to content

Commit

Permalink
Index: include/ChangeLog
Browse files Browse the repository at this point in the history
	* hashtab.h (htab_create): Restore prototype for backward
	compatibility.
	(htab_try_create): Likewise.

Index: libiberty/ChangeLog
	* hashtab.c (htab_create): New stub function for backward
	compatibility.
	(htab_try_create): Likewise.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54300 138bc75d-0d04-0410-961f-82ee72b054a4
  • Loading branch information
geoffk committed Jun 6, 2002
1 parent edfd563 commit 8d24e54
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 1 deletion.
6 changes: 6 additions & 0 deletions include/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2002-06-05 Geoffrey Keating <geoffk@redhat.com>

* hashtab.h (htab_create): Restore prototype for backward
compatibility.
(htab_try_create): Likewise.

2002-05-22 Geoffrey Keating <geoffk@redhat.com>

* hashtab.h (struct htab): Update for change to length specifier.
Expand Down
6 changes: 5 additions & 1 deletion include/hashtab.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,11 @@ extern htab_t htab_create_alloc PARAMS ((size_t, htab_hash,
htab_eq, htab_del,
htab_alloc, htab_free));

/* Provided for convenience... */
/* Backward-compatibility functions. */
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));

/* Provided for convenience. */
#define htab_create(SIZE, HASH, EQ, DEL) \
htab_create_alloc (SIZE, HASH, EQ, DEL, xcalloc, free)

Expand Down
6 changes: 6 additions & 0 deletions libiberty/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2002-06-05 Geoffrey Keating <geoffk@redhat.com>

* hashtab.c (htab_create): New stub function for backward
compatibility.
(htab_try_create): Likewise.

2002-06-03 Geoffrey Keating <geoffk@redhat.com>

* hashtab.c (htab_create): Delete.
Expand Down
23 changes: 23 additions & 0 deletions libiberty/hashtab.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,29 @@ htab_create_alloc (size, hash_f, eq_f, del_f, alloc_f, free_f)
return result;
}

/* These functions exist solely for backward compatibility. */

#undef htab_create
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. */

Expand Down

0 comments on commit 8d24e54

Please sign in to comment.