MCPcopy Create free account
hub / github.com/SVF-tools/SVF / cJSON_CreateStringReference

Function cJSON_CreateStringReference

svf/lib/Util/cJSON.cpp:2479–2489  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2477}
2478
2479CJSON_PUBLIC(cJSON *) cJSON_CreateStringReference(const char *string)
2480{
2481 cJSON *item = cJSON_New_Item(&global_hooks);
2482 if (item != NULL)
2483 {
2484 item->type = cJSON_String | cJSON_IsReference;
2485 item->valuestring = (char*)cast_away_const(string);
2486 }
2487
2488 return item;
2489}
2490
2491CJSON_PUBLIC(cJSON *) cJSON_CreateObjectReference(const cJSON *child)
2492{

Callers

nothing calls this directly

Calls 2

cJSON_New_ItemFunction · 0.85
cast_away_constFunction · 0.85

Tested by

no test coverage detected