mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-12 12:34:53 +01:00
0cfb8a24dc
These are intended to be simple wrappers to provide slightly better debugging information than what talloc currently provides natively.
14 lines
266 B
C
14 lines
266 B
C
#include <string.h>
|
|
#include "talloc-extra.h"
|
|
|
|
char *
|
|
talloc_strndup_named_const (void *ctx, const char *str,
|
|
size_t len, const char *name)
|
|
{
|
|
char *ptr = talloc_strndup (ctx, str, len);
|
|
|
|
if (ptr)
|
|
talloc_set_name_const (ptr, name);
|
|
|
|
return ptr;
|
|
}
|