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