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

Function cJSON_CreateObjectReference

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

Source from the content-addressed store, hash-verified

2351}
2352
2353CJSON_PUBLIC(cJSON *) cJSON_CreateObjectReference(const cJSON *child)
2354{
2355 cJSON *item = cJSON_New_Item(&global_hooks);
2356 if (item != NULL) {
2357 item->type = cJSON_Object | cJSON_IsReference;
2358 item->child = (cJSON*)cast_away_const(child);
2359 }
2360
2361 return item;
2362}
2363
2364CJSON_PUBLIC(cJSON *) cJSON_CreateArrayReference(const cJSON *child) {
2365 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