From 9bb796f33ac67abdf6c0bf55a06b0d8448caa3d3 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Tue, 25 May 2010 14:40:47 -0700 Subject: Add xtalloc_reference. Yet another talloc wrapper that should come in handy. --- glcpp.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'glcpp.h') diff --git a/glcpp.h b/glcpp.h index 503731b85b..6171ce8b4a 100644 --- a/glcpp.h +++ b/glcpp.h @@ -164,4 +164,10 @@ xtalloc_strndup (const void *t, const char *p, size_t n); char * xtalloc_asprintf (const void *t, const char *fmt, ...); +void * +_xtalloc_reference_loc (const void *context, + const void *ptr, const char *location); + +#define xtalloc_reference(ctx, ptr) (_TALLOC_TYPEOF(ptr))_xtalloc_reference_loc((ctx),(ptr), __location__) + #endif -- cgit v1.2.3