MCPcopy Create free account
hub / github.com/OpenIPC/firmware / cJSON_ReplaceItemInArray

Function cJSON_ReplaceItemInArray

general/package/xmdp/src/cjson/cJSON.c:2344–2352  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2342}
2343
2344CJSON_PUBLIC(cJSON_bool) cJSON_ReplaceItemInArray(cJSON *array, int which, cJSON *newitem)
2345{
2346 if (which < 0)
2347 {
2348 return false;
2349 }
2350
2351 return cJSON_ReplaceItemViaPointer(array, get_array_item(array, (size_t)which), newitem);
2352}
2353
2354static cJSON_bool replace_item_in_object(cJSON *object, const char *string, cJSON *replacement, cJSON_bool case_sensitive)
2355{

Callers

nothing calls this directly

Calls 2

get_array_itemFunction · 0.85

Tested by

no test coverage detected