Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/libvirt_private.syms | 1 +
src/util/virjson.c | 4 ++--
src/util/virjson.h | 5 +++++
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 73ef24d66f..7b9ea23ab9 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -2202,6 +2202,7 @@ virJSONValueObjectKeysNumber;
virJSONValueObjectRemoveKey;
virJSONValueObjectStealArray;
virJSONValueObjectStealObject;
+virJSONValueToBuffer;
virJSONValueToString;
diff --git a/src/util/virjson.c b/src/util/virjson.c
index 19857d2f2f..c519f8139e 100644
--- a/src/util/virjson.c
+++ b/src/util/virjson.c
@@ -1970,7 +1970,7 @@ virJSONValueToStringOne(virJSONValuePtr object,
}
-static int
+int
virJSONValueToBuffer(virJSONValuePtr object,
virBufferPtr buf,
bool pretty)
@@ -2031,7 +2031,7 @@ virJSONValueFromString(const char *jsonstring ATTRIBUTE_UNUSED)
}
-static int
+int
virJSONValueToBuffer(virJSONValuePtr object ATTRIBUTE_UNUSED,
virBufferPtr buf ATTRIBUTE_UNUSED,
bool pretty ATTRIBUTE_UNUSED)
diff --git a/src/util/virjson.h b/src/util/virjson.h
index 3dee103aba..ec86603794 100644
--- a/src/util/virjson.h
+++ b/src/util/virjson.h
@@ -26,6 +26,7 @@
# include "internal.h"
# include "virbitmap.h"
# include "viralloc.h"
+# include "virbuffer.h"
# include <stdarg.h>
@@ -143,6 +144,10 @@ int virJSONValueArrayAppendString(virJSONValuePtr object, const char
*value);
virJSONValuePtr virJSONValueFromString(const char *jsonstring);
char *virJSONValueToString(virJSONValuePtr object,
bool pretty);
+int virJSONValueToBuffer(virJSONValuePtr object,
+ virBufferPtr buf,
+ bool pretty)
+ ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
typedef int (*virJSONValueObjectIteratorFunc)(const char *key,
virJSONValuePtr value,
--
2.20.1