aboutsummaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
authorgeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>2002-06-06 03:23:27 +0000
committergeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>2002-06-06 03:23:27 +0000
commit8d24e54834bf52ae8dedb12eb8e3915e36f4115d (patch)
treee0250b97a908b1c147678728dd4baea6059d3377 /libiberty
parentedfd56325c0cebed6917002643a57e86901819d7 (diff)
Index: include/ChangeLog
* 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
Diffstat (limited to 'libiberty')
-rw-r--r--libiberty/ChangeLog6
-rw-r--r--libiberty/hashtab.c23
2 files changed, 29 insertions, 0 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 5abfbebaa26..916995e5b12 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -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.
diff --git a/libiberty/hashtab.c b/libiberty/hashtab.c
index 06e41ac29e5..6bf59ff7378 100644
--- a/libiberty/hashtab.c
+++ b/libiberty/hashtab.c
@@ -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. */