summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-12-21 15:15:49 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:07:35 -0500
commit3e7c0e10cfe956692834b952cec9e5f0f4a980b4 (patch)
treed417a3f104d94bd359d5f8d99d94226d85aee18b /source4/lib
parent4def245b7959900cd7f6c3dc336ab7209cb2d5dc (diff)
downloadsamba-3e7c0e10cfe956692834b952cec9e5f0f4a980b4.tar.gz
samba-3e7c0e10cfe956692834b952cec9e5f0f4a980b4.tar.bz2
samba-3e7c0e10cfe956692834b952cec9e5f0f4a980b4.zip
r4327: add usefull function if you don't want that the data will talloc_memdup()'ed
metze (This used to be commit 1f01e370b192fc8fa51eb3a46e7b45c993aa9b80)
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/data_blob.c7
1 files changed, 7 insertions, 0 deletions
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;
+}