| 2546 | } |
| 2547 | |
| 2548 | CJSON_PUBLIC(cJSON *) cJSON_CreateStringReference(const char *string) |
| 2549 | { |
| 2550 | cJSON *item = cJSON_New_Item(&global_hooks); |
| 2551 | if (item != NULL) |
| 2552 | { |
| 2553 | item->type = cJSON_String | cJSON_IsReference; |
| 2554 | item->valuestring = (char*)cast_away_const(string); |
| 2555 | } |
| 2556 | |
| 2557 | return item; |
| 2558 | } |
| 2559 | |
| 2560 | CJSON_PUBLIC(cJSON *) cJSON_CreateObjectReference(const cJSON *child) |
| 2561 | { |
nothing calls this directly
no test coverage detected