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

Function cJSON_New_Item

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

Internal constructor. */

Source from the content-addressed store, hash-verified

201
202/* Internal constructor. */
203static cJSON *cJSON_New_Item(const internal_hooks * const hooks)
204{
205 cJSON* node = (cJSON*)hooks->allocate(sizeof(cJSON));
206 if (node)
207 {
208 memset(node, '\0', sizeof(cJSON));
209 }
210
211 return node;
212}
213
214/* Delete a cJSON structure. */
215CJSON_PUBLIC(void) cJSON_Delete(cJSON *item)

Callers 15

cJSON_ParseWithOptsFunction · 0.85
parse_arrayFunction · 0.85
parse_objectFunction · 0.85
create_referenceFunction · 0.85
cJSON_CreateNullFunction · 0.85
cJSON_CreateTrueFunction · 0.85
cJSON_CreateFalseFunction · 0.85
cJSON_CreateBoolFunction · 0.85
cJSON_CreateNumberFunction · 0.85
cJSON_CreateStringFunction · 0.85

Calls 1

allocateMethod · 0.80

Tested by

no test coverage detected