MCPcopy Create free account
hub / github.com/Wassimulator/CactusViewer / cJSON_AddArrayToObject

Function cJSON_AddArrayToObject

src/cJSON.c:2175–2185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2173}
2174
2175CJSON_PUBLIC(cJSON*) cJSON_AddArrayToObject(cJSON * const object, const char * const name)
2176{
2177 cJSON *array = cJSON_CreateArray();
2178 if (add_item_to_object(object, name, array, &global_hooks, false))
2179 {
2180 return array;
2181 }
2182
2183 cJSON_Delete(array);
2184 return NULL;
2185}
2186
2187CJSON_PUBLIC(cJSON *) cJSON_DetachItemViaPointer(cJSON *parent, cJSON * const item)
2188{

Callers

nothing calls this directly

Calls 3

cJSON_CreateArrayFunction · 0.85
add_item_to_objectFunction · 0.85
cJSON_DeleteFunction · 0.85

Tested by

no test coverage detected