diff options
author | Daniel M. Weeks <dan@danweeks.net> | 2014-08-22 12:16:45 -0400 |
---|---|---|
committer | Daniel M. Weeks <dan@danweeks.net> | 2015-11-24 14:00:32 -0500 |
commit | 92e9a5032bc38ffef09b33991f035a423d5f79a4 (patch) | |
tree | 79f83f02f31ad731553e5eb14cd66166d9c282a8 /json_object.c | |
parent | 45c56b80c4b8a121e6eecbbe5cfeae74060b0468 (diff) | |
download | json-c-92e9a5032bc38ffef09b33991f035a423d5f79a4.tar.gz |
Use size_t for json object array ops
Diffstat (limited to 'json_object.c')
-rw-r--r-- | json_object.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/json_object.c b/json_object.c index 9ac22a3..8e7e8a1 100644 --- a/json_object.c +++ b/json_object.c @@ -868,7 +868,7 @@ static int json_object_array_to_json_string(struct json_object* jso, int flags) { int had_children = 0; - int ii; + size_t ii; sprintbuf(pb, "["); if (flags & JSON_C_TO_STRING_PRETTY) sprintbuf(pb, "\n"); @@ -959,7 +959,7 @@ struct json_object* json_object_array_bsearch( return *result; } -int json_object_array_length(struct json_object *jso) +size_t json_object_array_length(struct json_object *jso) { return array_list_length(jso->o.c_array); } @@ -969,14 +969,14 @@ int json_object_array_add(struct json_object *jso,struct json_object *val) return array_list_add(jso->o.c_array, val); } -int json_object_array_put_idx(struct json_object *jso, int idx, +int json_object_array_put_idx(struct json_object *jso, size_t idx, struct json_object *val) { return array_list_put_idx(jso->o.c_array, idx, val); } struct json_object* json_object_array_get_idx(struct json_object *jso, - int idx) + size_t idx) { return (struct json_object*)array_list_get_idx(jso->o.c_array, idx); } |