| 873 | return a; |
| 874 | } |
| 875 | cJSON *cJSON_CreateStringArray(const char **strings, int count) { |
| 876 | int i; |
| 877 | cJSON *n = 0, *p = 0, *a = cJSON_CreateArray(); |
| 878 | for (i = 0; a && i < count; i++) { |
| 879 | n = cJSON_CreateString(strings[i]); |
| 880 | if (!i) { |
| 881 | a->child = n; |
| 882 | } else { |
| 883 | suffix_object(p, n); |
| 884 | } |
| 885 | p = n; |
| 886 | } |
| 887 | return a; |
| 888 | } |
nothing calls this directly
no test coverage detected