summaryrefslogtreecommitdiff
path: root/lib/util/data_blob.h
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-10-13 05:20:26 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-10-13 05:20:26 +0200
commitaa982895e5c13497144740e90ff9646e1d1cf995 (patch)
treef21159a823cd8fd329dc073a841c576da2450fcc /lib/util/data_blob.h
parentd5a11f9679be9d053838074f1dad5a0ca880750f (diff)
downloadsamba-aa982895e5c13497144740e90ff9646e1d1cf995.tar.gz
samba-aa982895e5c13497144740e90ff9646e1d1cf995.tar.bz2
samba-aa982895e5c13497144740e90ff9646e1d1cf995.zip
Add data_blob_string_const_null() function that includes the terminating
null byte and use it in Samba 3. This matches the behaviour prior to my data_blob changes.
Diffstat (limited to 'lib/util/data_blob.h')
-rw-r--r--lib/util/data_blob.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/util/data_blob.h b/lib/util/data_blob.h
index 58c1117f1d..ffde51cf33 100644
--- a/lib/util/data_blob.h
+++ b/lib/util/data_blob.h
@@ -105,6 +105,14 @@ _PUBLIC_ char *data_blob_hex_string(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob);
_PUBLIC_ DATA_BLOB data_blob_string_const(const char *str);
/**
+ useful for constructing data blobs in test suites, while
+ avoiding const warnings
+
+ includes the terminating null character (as opposed to data_blo_string_const)
+**/
+_PUBLIC_ DATA_BLOB data_blob_string_const_null(const char *str);
+
+/**
* Create a new data blob from const data
*/
_PUBLIC_ DATA_BLOB data_blob_const(const void *p, size_t length);