From e1f38d81383c4adcb28b8e6e4bc0b3c7600277d4 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 6 Nov 2004 03:44:16 +0000 Subject: r3571: rough guesses at what abartlet really wanted to do in his last commit (which I suspect was missing some pieces) this at least fixes the build so i can keep going on pvfs. Please review/fix Andrew. (This used to be commit bffd18d09df04c1e492ef12f744ff4b6c561d53c) --- source4/lib/data_blob.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'source4/lib/data_blob.c') diff --git a/source4/lib/data_blob.c b/source4/lib/data_blob.c index 7803179d39..d2147be6b2 100644 --- a/source4/lib/data_blob.c +++ b/source4/lib/data_blob.c @@ -61,6 +61,18 @@ DATA_BLOB data_blob_talloc_named(TALLOC_CTX *mem_ctx, const void *p, size_t leng return ret; } + +/******************************************************************* + construct a data blob which is a reference to another blob, in +the given mem context +*******************************************************************/ +DATA_BLOB data_blob_talloc_reference(TALLOC_CTX *mem_ctx, DATA_BLOB *blob) +{ + DATA_BLOB ret = *blob; + ret.data = talloc_reference(mem_ctx, ret.data); + return ret; +} + /******************************************************************* construct a zero data blob, using supplied TALLOC_CTX. use this sparingly as it initialises data - better to initialise -- cgit