git.samba.org
/
samba.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
r4327: add usefull function if you don't want that the data will talloc_memdup()'ed
[samba.git]
/
source
/
lib
/
data_blob.c
diff --git
a/source/lib/data_blob.c
b/source/lib/data_blob.c
index 15518799335f57ebd296bcff683d96b672e7da18..18ecc2793ac7e14eab1dc417ee70fcedb391065a 100644
(file)
--- 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;
+}