MCPcopy Create free account
hub / github.com/OpenIPC/firmware / cJSON_CreateObjectReference

Function cJSON_CreateObjectReference

general/package/xmdp/src/cjson/cJSON.c:2482–2491  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2480}
2481
2482CJSON_PUBLIC(cJSON *) cJSON_CreateObjectReference(const cJSON *child)
2483{
2484 cJSON *item = cJSON_New_Item(&global_hooks);
2485 if (item != NULL) {
2486 item->type = cJSON_Object | cJSON_IsReference;
2487 item->child = (cJSON*)cast_away_const(child);
2488 }
2489
2490 return item;
2491}
2492
2493CJSON_PUBLIC(cJSON *) cJSON_CreateArrayReference(const cJSON *child) {
2494 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