mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-21 05:29:18 +00:00
util: json: Make argument of virJSONValueArraySize const
The function doesn't allow to modify the array in any way, thus the argument can be const.
This commit is contained in:
parent
165c34778b
commit
60e4e5783d
@ -797,7 +797,7 @@ virJSONValueIsArray(virJSONValuePtr array)
|
|||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
virJSONValueArraySize(virJSONValuePtr array)
|
virJSONValueArraySize(const virJSONValue *array)
|
||||||
{
|
{
|
||||||
if (array->type != VIR_JSON_TYPE_ARRAY)
|
if (array->type != VIR_JSON_TYPE_ARRAY)
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -105,7 +105,7 @@ int virJSONValueObjectHasKey(virJSONValuePtr object, const char *key);
|
|||||||
virJSONValuePtr virJSONValueObjectGet(virJSONValuePtr object, const char *key);
|
virJSONValuePtr virJSONValueObjectGet(virJSONValuePtr object, const char *key);
|
||||||
|
|
||||||
bool virJSONValueIsArray(virJSONValuePtr array);
|
bool virJSONValueIsArray(virJSONValuePtr array);
|
||||||
int virJSONValueArraySize(virJSONValuePtr object);
|
int virJSONValueArraySize(const virJSONValue *array);
|
||||||
virJSONValuePtr virJSONValueArrayGet(virJSONValuePtr object, unsigned int element);
|
virJSONValuePtr virJSONValueArrayGet(virJSONValuePtr object, unsigned int element);
|
||||||
virJSONValuePtr virJSONValueArraySteal(virJSONValuePtr object, unsigned int element);
|
virJSONValuePtr virJSONValueArraySteal(virJSONValuePtr object, unsigned int element);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user