]> git.notmuchmail.org Git - notmuch/blob - util/talloc-extra.h
util/crypto: _n_m_crypto_potential_payload returns whether part is the payload
[notmuch] / util / talloc-extra.h
1 #ifndef _TALLOC_EXTRA_H
2 #define _TALLOC_EXTRA_H
3
4 #include <talloc.h>
5
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
9
10 /* Like talloc_strndup, but take an extra parameter for the internal talloc
11  * name (for debugging) */
12
13 char *
14 talloc_strndup_named_const (void *ctx, const char *str,
15                             size_t len, const char *name);
16
17 /* use the __location__ macro from talloc.h to name a string according to its
18  * source location */
19
20 #define talloc_strndup_debug(ctx, str, len) talloc_strndup_named_const (ctx, str, len, __location__)
21
22 #ifdef __cplusplus
23 }
24 #endif
25
26 #endif