MCPcopy Create free account
hub / github.com/binbyu/Reader / cJSON_CreateObjectReference

Function cJSON_CreateObjectReference

opensrc/cjson/cJSON.c:2347–2356  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2345}
2346
2347CJSON_PUBLIC(cJSON *) cJSON_CreateObjectReference(const cJSON *child)
2348{
2349 cJSON *item = cJSON_New_Item(&global_hooks);
2350 if (item != NULL) {
2351 item->type = cJSON_Object | cJSON_IsReference;
2352 item->child = (cJSON*)cast_away_const(child);
2353 }
2354
2355 return item;
2356}
2357
2358CJSON_PUBLIC(cJSON *) cJSON_CreateArrayReference(const cJSON *child) {
2359 cJSON *item = cJSON_New_Item(&global_hooks);

Callers

nothing calls this directly

Calls 2

cJSON_New_ItemFunction · 0.85
cast_away_constFunction · 0.85

Tested by

no test coverage detected