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

Function cJSON_CreateStringReference

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

Source from the content-addressed store, hash-verified

2468}
2469
2470CJSON_PUBLIC(cJSON *) cJSON_CreateStringReference(const char *string)
2471{
2472 cJSON *item = cJSON_New_Item(&global_hooks);
2473 if (item != NULL)
2474 {
2475 item->type = cJSON_String | cJSON_IsReference;
2476 item->valuestring = (char*)cast_away_const(string);
2477 }
2478
2479 return item;
2480}
2481
2482CJSON_PUBLIC(cJSON *) cJSON_CreateObjectReference(const cJSON *child)
2483{

Callers

nothing calls this directly

Calls 2

cJSON_New_ItemFunction · 0.85
cast_away_constFunction · 0.85

Tested by

no test coverage detected