]> xenbits.xensource.com Git - libvirt.git/commit
util: json: Introduce virJSONValueObjectReplaceValue
authorPeter Krempa <pkrempa@redhat.com>
Mon, 20 Dec 2021 14:55:26 +0000 (15:55 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 3 Jan 2022 12:14:43 +0000 (13:14 +0100)
commita2c758398e596d7fdfb6ee275f39e43c8f95ac6f
treedfd53af7680f3acbcd5ffc422d0acd7ad247916e
parent5a781738d105b42be8cb430b4c6319313adec901
util: json: Introduce virJSONValueObjectReplaceValue

The new helper replaces the 'value' part of the key-value tuple in an
object. The advantage of this new helper is that it preserves the
ordering of the key in the object when compared to a combination of
stealing the old key and adding a new value. This will be needed for a
new test/helper for validating and modifying qemu capabilities data.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/libvirt_private.syms
src/util/virjson.c
src/util/virjson.h