From: Peter Krempa Date: Fri, 22 Jul 2016 14:56:37 +0000 (+0200) Subject: util: json: Make first argument of virJSONValueObjectForeachKeyValue const X-Git-Tag: v2.1.0-rc1~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc4339719eb8eb5c83127d6f152f9e77915a7b9c;p=thirdparty%2Flibvirt.git util: json: Make first argument of virJSONValueObjectForeachKeyValue const The iterator function (second argument) already requires that the object is handled as 'const' thus we won't modify the object itself. --- diff --git a/src/util/virjson.c b/src/util/virjson.c index 1022cfc4b9..afc98e3e84 100644 --- a/src/util/virjson.c +++ b/src/util/virjson.c @@ -1220,7 +1220,7 @@ virJSONValueObjectIsNull(virJSONValuePtr object, * during iteration and -1 on generic errors. */ int -virJSONValueObjectForeachKeyValue(virJSONValuePtr object, +virJSONValueObjectForeachKeyValue(const virJSONValue *object, virJSONValueObjectIteratorFunc cb, void *opaque) { diff --git a/src/util/virjson.h b/src/util/virjson.h index 66ed48aad5..a5aef3957c 100644 --- a/src/util/virjson.h +++ b/src/util/virjson.h @@ -167,7 +167,7 @@ typedef int (*virJSONValueObjectIteratorFunc)(const char *key, const virJSONValue *value, void *opaque); -int virJSONValueObjectForeachKeyValue(virJSONValuePtr object, +int virJSONValueObjectForeachKeyValue(const virJSONValue *object, virJSONValueObjectIteratorFunc cb, void *opaque);