summaryrefslogtreecommitdiff
path: root/source4/lib/util/data_blob.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/util/data_blob.c')
-rw-r--r--source4/lib/util/data_blob.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/source4/lib/util/data_blob.c b/source4/lib/util/data_blob.c
index dfcfaa41ea..c1513a1d78 100644
--- a/source4/lib/util/data_blob.c
+++ b/source4/lib/util/data_blob.c
@@ -30,7 +30,7 @@
construct a data blob, must be freed with data_blob_free()
you can pass NULL for p and get a blank data blob
**/
-DATA_BLOB data_blob_named(const void *p, size_t length, const char *name)
+_PUBLIC_ DATA_BLOB data_blob_named(const void *p, size_t length, const char *name)
{
DATA_BLOB ret;
@@ -56,7 +56,7 @@ DATA_BLOB data_blob_named(const void *p, size_t length, const char *name)
/**
construct a data blob, using supplied TALLOC_CTX
**/
-DATA_BLOB data_blob_talloc_named(TALLOC_CTX *mem_ctx, const void *p, size_t length, const char *name)
+_PUBLIC_ DATA_BLOB data_blob_talloc_named(TALLOC_CTX *mem_ctx, const void *p, size_t length, const char *name)
{
DATA_BLOB ret = data_blob_named(p, length, name);
@@ -71,7 +71,7 @@ DATA_BLOB data_blob_talloc_named(TALLOC_CTX *mem_ctx, const void *p, size_t leng
reference a data blob, to the supplied TALLOC_CTX.
Returns a NULL DATA_BLOB on failure
**/
-DATA_BLOB data_blob_talloc_reference(TALLOC_CTX *mem_ctx, DATA_BLOB *blob)
+_PUBLIC_ DATA_BLOB data_blob_talloc_reference(TALLOC_CTX *mem_ctx, DATA_BLOB *blob)
{
DATA_BLOB ret = *blob;
@@ -88,7 +88,7 @@ DATA_BLOB data_blob_talloc_reference(TALLOC_CTX *mem_ctx, DATA_BLOB *blob)
use this sparingly as it initialises data - better to initialise
yourself if you want specific data in the blob
**/
-DATA_BLOB data_blob_talloc_zero(TALLOC_CTX *mem_ctx, size_t length)
+_PUBLIC_ DATA_BLOB data_blob_talloc_zero(TALLOC_CTX *mem_ctx, size_t length)
{
DATA_BLOB blob = data_blob_talloc(mem_ctx, NULL, length);
data_blob_clear(&blob);
@@ -98,7 +98,7 @@ DATA_BLOB data_blob_talloc_zero(TALLOC_CTX *mem_ctx, size_t length)
/**
free a data blob
**/
-void data_blob_free(DATA_BLOB *d)
+_PUBLIC_ void data_blob_free(DATA_BLOB *d)
{
if (d) {
talloc_free(d->data);
@@ -110,7 +110,7 @@ void data_blob_free(DATA_BLOB *d)
/**
clear a DATA_BLOB's contents
**/
-void data_blob_clear(DATA_BLOB *d)
+_PUBLIC_ void data_blob_clear(DATA_BLOB *d)
{
if (d->data) {
memset(d->data, 0, d->length);
@@ -120,7 +120,7 @@ void data_blob_clear(DATA_BLOB *d)
/**
free a data blob and clear its contents
**/
-void data_blob_clear_free(DATA_BLOB *d)
+_PUBLIC_ void data_blob_clear_free(DATA_BLOB *d)
{
data_blob_clear(d);
data_blob_free(d);
@@ -130,7 +130,7 @@ void data_blob_clear_free(DATA_BLOB *d)
/**
check if two data blobs are equal
**/
-BOOL data_blob_equal(const DATA_BLOB *d1, const DATA_BLOB *d2)
+_PUBLIC_ BOOL data_blob_equal(const DATA_BLOB *d1, const DATA_BLOB *d2)
{
if (d1->length != d2->length) {
return False;
@@ -150,7 +150,7 @@ BOOL data_blob_equal(const DATA_BLOB *d1, const DATA_BLOB *d2)
/**
print the data_blob as hex string
**/
-char *data_blob_hex_string(TALLOC_CTX *mem_ctx, DATA_BLOB *blob)
+_PUBLIC_ char *data_blob_hex_string(TALLOC_CTX *mem_ctx, DATA_BLOB *blob)
{
int i;
char *hex_string;
@@ -170,7 +170,7 @@ char *data_blob_hex_string(TALLOC_CTX *mem_ctx, DATA_BLOB *blob)
useful for constructing data blobs in test suites, while
avoiding const warnings
**/
-DATA_BLOB data_blob_string_const(const char *str)
+_PUBLIC_ DATA_BLOB data_blob_string_const(const char *str)
{
DATA_BLOB blob;
blob.data = discard_const(str);
@@ -178,7 +178,7 @@ DATA_BLOB data_blob_string_const(const char *str)
return blob;
}
-DATA_BLOB data_blob_const(const void *p, size_t length)
+_PUBLIC_ DATA_BLOB data_blob_const(const void *p, size_t length)
{
DATA_BLOB blob;
blob.data = discard_const(p);
@@ -190,7 +190,7 @@ DATA_BLOB data_blob_const(const void *p, size_t length)
/**
realloc a data_blob
**/
-NTSTATUS data_blob_realloc(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, size_t length)
+_PUBLIC_ NTSTATUS data_blob_realloc(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, size_t length)
{
blob->data = talloc_realloc_size(mem_ctx, blob->data, length);
NT_STATUS_HAVE_NO_MEMORY(blob->data);
@@ -201,7 +201,7 @@ NTSTATUS data_blob_realloc(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, size_t length)
/**
append some data to a data blob
**/
-NTSTATUS data_blob_append(TALLOC_CTX *mem_ctx, DATA_BLOB *blob,
+_PUBLIC_ NTSTATUS data_blob_append(TALLOC_CTX *mem_ctx, DATA_BLOB *blob,
const void *p, size_t length)
{
blob->data = talloc_realloc_size(mem_ctx, blob->data,