| 2345 | } |
| 2346 | |
| 2347 | CJSON_PUBLIC(cJSON *) cJSON_CreateObjectReference(const cJSON *child) |
| 2348 | { |
| 2349 | cJSON *item = cJSON_New_Item(&global_hooks); |
| 2350 | if (item != NULL) { |
| 2351 | item->type = cJSON_Object | cJSON_IsReference; |
| 2352 | item->child = (cJSON*)cast_away_const(child); |
| 2353 | } |
| 2354 | |
| 2355 | return item; |
| 2356 | } |
| 2357 | |
| 2358 | CJSON_PUBLIC(cJSON *) cJSON_CreateArrayReference(const cJSON *child) { |
| 2359 | cJSON *item = cJSON_New_Item(&global_hooks); |
nothing calls this directly
no test coverage detected