MCPcopy Create free account
hub / github.com/Netis/cloud-probe / cJSON_CreateStringReference

Function cJSON_CreateStringReference

cpworker/src/cJSON/cJSON.c:2495–2505  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2493}
2494
2495CJSON_PUBLIC(cJSON *) cJSON_CreateStringReference(const char *string)
2496{
2497 cJSON *item = cJSON_New_Item(&global_hooks);
2498 if (item != NULL)
2499 {
2500 item->type = cJSON_String | cJSON_IsReference;
2501 item->valuestring = (char*)cast_away_const(string);
2502 }
2503
2504 return item;
2505}
2506
2507CJSON_PUBLIC(cJSON *) cJSON_CreateObjectReference(const cJSON *child)
2508{

Callers

nothing calls this directly

Calls 2

cJSON_New_ItemFunction · 0.85
cast_away_constFunction · 0.85

Tested by

no test coverage detected