MCPcopy Create free account
hub / github.com/ading2210/linuxpdf / json_array_get

Function json_array_get

tinyemu/json.c:148–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

146}
147
148JSONValue json_array_get(JSONValue val, unsigned int idx)
149{
150 JSONArray *array;
151
152 if (val.type != JSON_ARRAY)
153 return json_undefined_new();
154 array = val.u.array;
155 if (idx < array->len) {
156 return array->tab[idx];
157 } else {
158 return json_undefined_new();
159 }
160}
161
162int json_array_set(JSONValue val, unsigned int idx, JSONValue prop_val)
163{

Callers 2

fs_dump_cache_loadFunction · 0.85
bf_init_onloadFunction · 0.85

Calls 1

json_undefined_newFunction · 0.85

Tested by

no test coverage detected