]> git.notmuchmail.org Git - notmuch/commitdiff
util/unicode: allow calling from C++
authorDavid Bremner <david@tethera.net>
Tue, 24 Aug 2021 15:17:21 +0000 (08:17 -0700)
committerDavid Bremner <david@tethera.net>
Sun, 5 Sep 2021 00:07:19 +0000 (17:07 -0700)
The omission of the 'extern "C"' machinery seems like an oversight.

util/unicode-util.h

index 32d1e6ef693ae4cc5267b09d3dbf6641db03c2f0..1bb9336a2ed6c615dd8aacce4618800000527691 100644 (file)
@@ -4,9 +4,16 @@
 #include <stdbool.h>
 #include <gmodule.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* The utf8 encoded string would tokenize as a single word, according
  * to xapian. */
 bool unicode_word_utf8 (const char *str);
 typedef gunichar notmuch_unichar;
 
+#ifdef __cplusplus
+}
+#endif
 #endif