Utility for handling references. */
| 676 | } |
| 677 | /* Utility for handling references. */ |
| 678 | static cJSON *create_reference(cJSON *item) { |
| 679 | cJSON *ref = cJSON_New_Item(); |
| 680 | if (!ref) return 0; |
| 681 | memcpy(ref, item, sizeof(cJSON)); |
| 682 | ref->string = 0; |
| 683 | ref->type |= cJSON_IsReference; |
| 684 | ref->next = ref->prev = 0; |
| 685 | return ref; |
| 686 | } |
| 687 | |
| 688 | /* Add item to array/object. */ |
| 689 | void cJSON_AddItemToArray(cJSON *array, cJSON *item) { |
no test coverage detected