MCPcopy Create free account
hub / github.com/ByConity/ByConity / cJSON_New_Item

Function cJSON_New_Item

contrib/cJSON/cJSON.cpp:202–211  ·  view source on GitHub ↗

Internal constructor. */

Source from the content-addressed store, hash-verified

200
201/* Internal constructor. */
202static cJSON *cJSON_New_Item(const internal_hooks * const hooks)
203{
204 cJSON* node = (cJSON*)hooks->allocate(sizeof(cJSON));
205 if (node)
206 {
207 memset(node, '\0', sizeof(cJSON));
208 }
209
210 return node;
211}
212
213/* Delete a cJSON structure. */
214CJSON_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_CreateInt64Function · 0.85
cJSON_CreateStringFunction · 0.85

Calls 1

allocateMethod · 0.45

Tested by

no test coverage detected