From 3e7c0e10cfe956692834b952cec9e5f0f4a980b4 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 21 Dec 2004 15:15:49 +0000 Subject: r4327: add usefull function if you don't want that the data will talloc_memdup()'ed metze (This used to be commit 1f01e370b192fc8fa51eb3a46e7b45c993aa9b80) --- source4/lib/data_blob.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source4') diff --git a/source4/lib/data_blob.c b/source4/lib/data_blob.c index 1551879933..18ecc2793a 100644 --- a/source4/lib/data_blob.c +++ b/source4/lib/data_blob.c @@ -173,3 +173,10 @@ DATA_BLOB data_blob_string_const(const char *str) return blob; } +DATA_BLOB data_blob_const(const void *p, size_t length) +{ + DATA_BLOB blob; + blob.data = discard_const(p); + blob.length = length; + return blob; +} -- cgit