MCPcopy Create free account
hub / github.com/alibaba/CicadaPlayer / cJSON_AddArrayToObject

Function cJSON_AddArrayToObject

framework/utils/cJSON.c:2059–2069  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2057}
2058
2059CJSON_PUBLIC(cJSON*) cJSON_AddArrayToObject(cJSON * const object, const char * const name)
2060{
2061cJSON *array = cJSON_CreateArray();
2062if (add_item_to_object(object, name, array, &global_hooks, false))
2063{
2064return array;
2065}
2066
2067cJSON_Delete(array);
2068return NULL;
2069}
2070
2071CJSON_PUBLIC(cJSON *) cJSON_DetachItemViaPointer(cJSON *parent, cJSON * const item)
2072{

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