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