MCPcopy Index your code
hub / github.com/antirez/botlib / cJSON_CreateStringReference

Function cJSON_CreateStringReference

cJSON.c:2463–2473  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2461}
2462
2463CJSON_PUBLIC(cJSON *) cJSON_CreateStringReference(const char *string)
2464{
2465 cJSON *item = cJSON_New_Item(&global_hooks);
2466 if (item != NULL)
2467 {
2468 item->type = cJSON_String | cJSON_IsReference;
2469 item->valuestring = (char*)cast_away_const(string);
2470 }
2471
2472 return item;
2473}
2474
2475CJSON_PUBLIC(cJSON *) cJSON_CreateObjectReference(const cJSON *child)
2476{

Callers

nothing calls this directly

Calls 2

cJSON_New_ItemFunction · 0.85
cast_away_constFunction · 0.85

Tested by

no test coverage detected