diff options
| author | David Bremner <david@tethera.net> | 2019-03-02 16:26:06 -0400 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2019-03-11 22:26:50 -0300 |
| commit | 152b6cac5d496aaad816d20d7b2286e9ac73207d (patch) | |
| tree | b3796f575398e2588d102b327572265e342afd47 /util/talloc-extra.h | |
| parent | 9f7e851263b96acacc9ea542e9f5d837563fea05 (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/talloc-extra.h')
| -rw-r--r-- | util/talloc-extra.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/util/talloc-extra.h b/util/talloc-extra.h index eac5dc05..e2e61734 100644 --- a/util/talloc-extra.h +++ b/util/talloc-extra.h @@ -3,6 +3,10 @@ #include <talloc.h> +#ifdef __cplusplus +extern "C" { +#endif + /* Like talloc_strndup, but take an extra parameter for the internal talloc * name (for debugging) */ @@ -15,4 +19,8 @@ talloc_strndup_named_const (void *ctx, const char *str, #define talloc_strndup_debug(ctx, str, len) talloc_strndup_named_const (ctx, str, len, __location__) +#ifdef __cplusplus +} +#endif + #endif |
