mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
util: json: Remove 'virJSONValueObjectReplaceValue'
The helper was used only in 'qemucapabilitiesnumbering' test which was removed. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
parent
19f9cf2ae8
commit
b8d9419e12
@ -2665,7 +2665,6 @@ virJSONValueObjectHasKey;
|
||||
virJSONValueObjectKeysNumber;
|
||||
virJSONValueObjectPrependString;
|
||||
virJSONValueObjectRemoveKey;
|
||||
virJSONValueObjectReplaceValue;
|
||||
virJSONValueObjectStealArray;
|
||||
virJSONValueObjectStealObject;
|
||||
virJSONValueToBuffer;
|
||||
|
@ -1136,26 +1136,6 @@ virJSONValueObjectGetString(virJSONValue *object,
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
virJSONValueObjectReplaceValue(virJSONValue *object,
|
||||
const char *key,
|
||||
virJSONValue **newval)
|
||||
{
|
||||
size_t i;
|
||||
|
||||
if (object->type != VIR_JSON_TYPE_OBJECT ||
|
||||
!*newval)
|
||||
return;
|
||||
|
||||
for (i = 0; i < object->data.object.npairs; i++) {
|
||||
if (STREQ(object->data.object.pairs[i].key, key)) {
|
||||
virJSONValueFree(object->data.object.pairs[i].value);
|
||||
object->data.object.pairs[i].value = g_steal_pointer(newval);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* virJSONValueObjectGetStringOrNumber:
|
||||
* @object: JSON value object
|
||||
|
@ -241,12 +241,6 @@ virJSONValueObjectRemoveKey(virJSONValue *object,
|
||||
virJSONValue **value)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
||||
|
||||
void
|
||||
virJSONValueObjectReplaceValue(virJSONValue *object,
|
||||
const char *key,
|
||||
virJSONValue **newval)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3);
|
||||
|
||||
int
|
||||
virJSONValueArrayAppendString(virJSONValue *object,
|
||||
const char *value);
|
||||
|
Loading…
Reference in New Issue
Block a user