summaryrefslogtreecommitdiff
path: root/devel/jansson/files/patch-src_jansson.h
blob: edca944cf86f1cccf8746509e232e2ff7a9cedff (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
--- src/jansson.h.orig	2016-08-26 17:37:02 UTC
+++ src/jansson.h
@@ -159,10 +159,10 @@ int json_object_iter_set_new(json_t *obj
         key = json_object_iter_key(n), \
             n = json_object_iter_next(object, json_object_key_to_iter(key)))
 
-#define json_array_foreach(array, index, value) \
-	for(index = 0; \
-		index < json_array_size(array) && (value = json_array_get(array, index)); \
-		index++)
+#define json_array_foreach(array, idx, value) \
+	for(idx = 0; \
+		idx < json_array_size(array) && (value = json_array_get(array, idx)); \
+		idx++)
 
 static JSON_INLINE
 int json_object_set(json_t *object, const char *key, json_t *value)
@@ -183,11 +183,11 @@ int json_object_iter_set(json_t *object,
 }
 
 size_t json_array_size(const json_t *array);
-json_t *json_array_get(const json_t *array, size_t index);
-int json_array_set_new(json_t *array, size_t index, json_t *value);
+json_t *json_array_get(const json_t *array, size_t idx);
+int json_array_set_new(json_t *array, size_t idx, json_t *value);
 int json_array_append_new(json_t *array, json_t *value);
-int json_array_insert_new(json_t *array, size_t index, json_t *value);
-int json_array_remove(json_t *array, size_t index);
+int json_array_insert_new(json_t *array, size_t idx, json_t *value);
+int json_array_remove(json_t *array, size_t idx);
 int json_array_clear(json_t *array);
 int json_array_extend(json_t *array, json_t *other);