Signed-off-by: Jiri Denemark <jdene...@redhat.com>
---
 src/libvirt_private.syms | 1 +
 src/util/virjson.c       | 8 ++++++++
 src/util/virjson.h       | 2 ++
 3 files changed, 11 insertions(+)

diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index cab324c4d7..0918e69525 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -2098,6 +2098,7 @@ virJSONValueObjectIsNull;
 virJSONValueObjectKeysNumber;
 virJSONValueObjectRemoveKey;
 virJSONValueObjectStealArray;
+virJSONValueObjectStealObject;
 virJSONValueToString;
 
 
diff --git a/src/util/virjson.c b/src/util/virjson.c
index 3ddefc34ca..dfe00d9280 100644
--- a/src/util/virjson.c
+++ b/src/util/virjson.c
@@ -1400,6 +1400,14 @@ virJSONValueObjectStealArray(virJSONValuePtr object, 
const char *key)
 }
 
 
+virJSONValuePtr
+virJSONValueObjectStealObject(virJSONValuePtr object,
+                              const char *key)
+{
+    return virJSONValueObjectStealByType(object, key, VIR_JSON_TYPE_OBJECT);
+}
+
+
 int
 virJSONValueObjectIsNull(virJSONValuePtr object,
                          const char *key)
diff --git a/src/util/virjson.h b/src/util/virjson.h
index f7283dcf97..0f098892b4 100644
--- a/src/util/virjson.h
+++ b/src/util/virjson.h
@@ -112,6 +112,8 @@ virJSONValuePtr virJSONValueObjectGetArray(virJSONValuePtr 
object,
                                            const char *key);
 virJSONValuePtr virJSONValueObjectStealArray(virJSONValuePtr object,
                                              const char *key);
+virJSONValuePtr virJSONValueObjectStealObject(virJSONValuePtr object,
+                                              const char *key);
 
 const char *virJSONValueObjectGetString(virJSONValuePtr object, const char 
*key);
 const char *virJSONValueObjectGetStringOrNumber(virJSONValuePtr object, const 
char *key);
-- 
2.17.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to