summaryrefslogtreecommitdiff
path: root/lib/hash.h
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2020-10-17 03:00:59 +0200
committerBruno Haible <bruno@clisp.org>2020-10-17 03:00:59 +0200
commit342e7423fd65e96f83299494d69ddf03e171413e (patch)
tree3ecd47f3d134a66a93297699e0c02a06abd12edc /lib/hash.h
parentf0e75527194fc0821af1cb4d01cbb12928a77926 (diff)
downloadgnulib-342e7423fd65e96f83299494d69ddf03e171413e.tar.gz
hash: Rename hash_delete to hash_remove.
* lib/hash.h (hash_remove): Renamed from hash_delete. (hash_delete): New declaration. * lib/hash.c (hash_remove): Renamed from hash_delete. (hash_delete): New function. * tests/test-hash.c (main): Update. * lib/fts-cycle.c (leave_dir): Likewise. * NEWS: Mention the change.
Diffstat (limited to 'lib/hash.h')
-rw-r--r--lib/hash.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/hash.h b/lib/hash.h
index a9d78c0fa2..e280adb13b 100644
--- a/lib/hash.h
+++ b/lib/hash.h
@@ -247,7 +247,12 @@ extern int hash_insert_if_absent (Hash_table *table, const void *entry,
/* If ENTRY is already in the table, remove it and return the just-deleted
data (the user may want to deallocate its storage). If ENTRY is not in the
table, don't modify the table and return NULL. */
-extern void *hash_delete (Hash_table *table, const void *entry);
+extern void *hash_remove (Hash_table *table, const void *entry);
+
+/* Same as hash_remove. This interface is deprecated.
+ FIXME: Remove in 2022. */
+extern void *hash_delete (Hash_table *table, const void *entry)
+ _GL_ATTRIBUTE_DEPRECATED;
# ifdef __cplusplus
}