From 1f01e370b192fc8fa51eb3a46e7b45c993aa9b80 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 21 Dec 2004 15:15:49 +0000 Subject: [PATCH] r4327: add usefull function if you don't want that the data will talloc_memdup()'ed metze --- source/lib/data_blob.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/lib/data_blob.c b/source/lib/data_blob.c index 15518799335..18ecc2793ac 100644 --- a/source/lib/data_blob.c +++ b/source/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; +} -- 2.34.1