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

Function cJSON_CreateStringReference

opensrc/cjson/cJSON.c:2335–2345  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2333}
2334
2335CJSON_PUBLIC(cJSON *) cJSON_CreateStringReference(const char *string)
2336{
2337 cJSON *item = cJSON_New_Item(&global_hooks);
2338 if (item != NULL)
2339 {
2340 item->type = cJSON_String | cJSON_IsReference;
2341 item->valuestring = (char*)cast_away_const(string);
2342 }
2343
2344 return item;
2345}
2346
2347CJSON_PUBLIC(cJSON *) cJSON_CreateObjectReference(const cJSON *child)
2348{

Callers

nothing calls this directly

Calls 2

cJSON_New_ItemFunction · 0.85
cast_away_constFunction · 0.85

Tested by

no test coverage detected