Add item to array/object. */
| 844 | |
| 845 | /* Add item to array/object. */ |
| 846 | void cJSON_AddItemToArray(cJSON *array, cJSON *item) |
| 847 | { |
| 848 | cJSON *c = array->child; |
| 849 | if (!item) |
| 850 | return; |
| 851 | if (!c) |
| 852 | { |
| 853 | array->child = item; |
| 854 | } |
| 855 | else |
| 856 | { |
| 857 | while (c && c->next) |
| 858 | c = c->next; |
| 859 | suffix_object(c, item); |
| 860 | } |
| 861 | } |
| 862 | |
| 863 | void cJSON_AddItemToArrayHead(cJSON *array, cJSON *item) |
| 864 | { |
no test coverage detected