diff --git a/doc/apiref.rst b/doc/apiref.rst index 24b6085..198c0c2 100644 --- a/doc/apiref.rst +++ b/doc/apiref.rst @@ -516,7 +516,7 @@ in an array. :type:`json_t *` respectively. Example:: /* array is a JSON array */ - int index; + size_t index; json_t *value; json_array_foreach(array, index, value) { diff --git a/test/suites/api/test_array.c b/test/suites/api/test_array.c index c000775..51d47ed 100644 --- a/test/suites/api/test_array.c +++ b/test/suites/api/test_array.c @@ -402,7 +402,7 @@ static void test_circular() static void test_array_foreach() { - int index; + size_t index; json_t *array1, *array2, *value; array1 = json_pack("[sisisi]", "foo", 1, "bar", 2, "baz", 3);