From: Stefan Metzmacher Date: Tue, 21 Dec 2004 15:15:49 +0000 (+0000) Subject: r4327: add usefull function if you don't want that the data will talloc_memdup()'ed X-Git-Tag: samba-4.0.0alpha6~801^3~12246 X-Git-Url: http://git.samba.org/?p=samba.git;a=commitdiff_plain;h=3e7c0e10cfe956692834b952cec9e5f0f4a980b4 r4327: add usefull function if you don't want that the data will talloc_memdup()'ed metze (This used to be commit 1f01e370b192fc8fa51eb3a46e7b45c993aa9b80) --- diff --git a/source4/lib/data_blob.c b/source4/lib/data_blob.c index 15518799335..18ecc2793ac 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; +}