aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeoffrey Keating <geoffk@redhat.com>2002-06-06 03:23:27 +0000
committerGeoffrey Keating <geoffk@gcc.gnu.org>2002-06-06 03:23:27 +0000
commit045b3a49caf8407c938c33f24f3cc90401f53d82 (patch)
treee0250b97a908b1c147678728dd4baea6059d3377
parent3cb8660c64af87c83b1a5f74563d0e54826185b7 (diff)
downloadgcc-045b3a49caf8407c938c33f24f3cc90401f53d82.zip
gcc-045b3a49caf8407c938c33f24f3cc90401f53d82.tar.gz
gcc-045b3a49caf8407c938c33f24f3cc90401f53d82.tar.bz2
Index: include/ChangeLog
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. From-SVN: r54300
-rw-r--r--include/ChangeLog6
-rw-r--r--include/hashtab.h6
-rw-r--r--libiberty/ChangeLog6
-rw-r--r--libiberty/hashtab.c23
4 files changed, 40 insertions, 1 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index 75ce45a..7b1dc5a 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -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.
diff --git a/include/hashtab.h b/include/hashtab.h
index a3ae5ae..4e5b4e7 100644
--- a/include/hashtab.h
+++ b/include/hashtab.h
@@ -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)
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 5abfbeb..916995e 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 06e41ac..6bf59ff 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. */