]> Savannah Git Hosting - gnulib.git/commitdiff
hash, xhash: Make usable from C++.
authorBruno Haible <bruno@clisp.org>
Sat, 17 Oct 2020 01:00:35 +0000 (03:00 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 17 Oct 2020 01:00:35 +0000 (03:00 +0200)
* lib/hash.h: Add extern "C".

ChangeLog
lib/hash.h

index 2fd62f2942911b44996cc4b9406f17442e240e43..d8643b94cdd95fe4d293f3cde74cd521330273a4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2020-10-16  Bruno Haible  <bruno@clisp.org>
+
+       hash, xhash: Make usable from C++.
+       * lib/hash.h: Add extern "C".
+
 2020-10-16  Bruno Haible  <bruno@clisp.org>
 
        hash, xhash: Move comments to the .h file.
index 848117db9f946a65bbeead5f9c8a111b31501503..a9d78c0fa20bea382cf700b3aee63d2296ab3492 100644 (file)
 # include <stdio.h>
 # include <stdbool.h>
 
+# ifdef __cplusplus
+extern "C" {
+# endif
+
 struct hash_tuning
   {
     /* This structure is mainly used for 'hash_initialize', see the block
@@ -245,4 +249,8 @@ extern int hash_insert_if_absent (Hash_table *table, const void *entry,
    table, don't modify the table and return NULL.  */
 extern void *hash_delete (Hash_table *table, const void *entry);
 
+# ifdef __cplusplus
+}
+# endif
+
 #endif