| 2477 | } |
| 2478 | |
| 2479 | CJSON_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 | |
| 2491 | CJSON_PUBLIC(cJSON *) cJSON_CreateObjectReference(const cJSON *child) |
| 2492 | { |
nothing calls this directly
no test coverage detected