Utility for handling references. */
| 831 | } |
| 832 | /* Utility for handling references. */ |
| 833 | static cJSON *create_reference(cJSON *item) |
| 834 | { |
| 835 | cJSON *ref = cJSON_New_Item(); |
| 836 | if (!ref) |
| 837 | return 0; |
| 838 | memcpy(ref, item, sizeof(cJSON)); |
| 839 | ref->string = 0; |
| 840 | ref->type |= cJSON_IsReference; |
| 841 | ref->next = ref->prev = 0; |
| 842 | return ref; |
| 843 | } |
| 844 | |
| 845 | /* Add item to array/object. */ |
| 846 | void cJSON_AddItemToArray(cJSON *array, cJSON *item) |
no test coverage detected