mirror of
https://github.com/json-c/json-c.git
synced 2026-03-29 18:09:07 +08:00
Create a json_pointer_private.h and move a few things there, fix test warnings, note array_list_insert_idx is private.
This commit is contained in:
@@ -7,7 +7,9 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "json.h"
|
||||
#include "snprintf_compat.h"
|
||||
|
||||
#ifndef PATH_MAX
|
||||
#define PATH_MAX 256
|
||||
@@ -70,7 +72,7 @@ void test_json_patch_using_file(const char *testdir, const char *filename)
|
||||
{
|
||||
char full_filename[PATH_MAX];
|
||||
(void)snprintf(full_filename, sizeof(full_filename), "%s/%s", testdir, filename);
|
||||
int i;
|
||||
size_t ii;
|
||||
|
||||
json_object *jo = json_object_from_file(full_filename);
|
||||
if (!jo) {
|
||||
@@ -78,8 +80,8 @@ void test_json_patch_using_file(const char *testdir, const char *filename)
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
for (i = 0; i < json_object_array_length(jo); i++) {
|
||||
struct json_object *jo1 = json_object_array_get_idx(jo, i);
|
||||
for (ii = 0; ii < json_object_array_length(jo); ii++) {
|
||||
struct json_object *jo1 = json_object_array_get_idx(jo, ii);
|
||||
test_json_patch_op(jo1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user