MCPcopy Create free account
hub / github.com/Tencent/Hardcoder / cJSON_AddArrayToObject

Function cJSON_AddArrayToObject

libapp2sys/src/main/cpp/cjson/cJSON.c:2067–2077  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2065}
2066
2067CJSON_PUBLIC(cJSON*) cJSON_AddArrayToObject(cJSON * const object, const char * const name)
2068{
2069 cJSON *array = cJSON_CreateArray();
2070 if (add_item_to_object(object, name, array, &global_hooks, false))
2071 {
2072 return array;
2073 }
2074
2075 cJSON_Delete(array);
2076 return NULL;
2077}
2078
2079CJSON_PUBLIC(cJSON *) cJSON_DetachItemViaPointer(cJSON *parent, cJSON * const item)
2080{

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