aboutsummaryrefslogtreecommitdiff
path: root/util/crypto.h
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2019-03-02 16:26:06 -0400
committerDavid Bremner <david@tethera.net>2019-03-11 22:26:50 -0300
commit152b6cac5d496aaad816d20d7b2286e9ac73207d (patch)
treeb3796f575398e2588d102b327572265e342afd47 /util/crypto.h
parent9f7e851263b96acacc9ea542e9f5d837563fea05 (diff)
util: make remaining headers includable from C++
libnotmuch_util.a is supposed to be usable from the library and the CLI, but much the library is compiled as C++. Add in appropriate wrapping to prevent symbol mangling. These wrappers already existed in string-util.h; it seems better to be consistent.
Diffstat (limited to 'util/crypto.h')
-rw-r--r--util/crypto.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/util/crypto.h b/util/crypto.h
index c384601c..1a90f0e0 100644
--- a/util/crypto.h
+++ b/util/crypto.h
@@ -5,6 +5,10 @@
#include "gmime-extra.h"
#include "notmuch.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct _notmuch_crypto {
bool verify;
notmuch_decryption_policy_t decrypt;
@@ -34,4 +38,7 @@ _notmuch_crypto_get_gmime_ctx_for_protocol (_notmuch_crypto_t *crypto,
void
_notmuch_crypto_cleanup (_notmuch_crypto_t *crypto);
+#ifdef __cplusplus
+}
+#endif
#endif