| 1081 | return a; |
| 1082 | } |
| 1083 | cJSON *cJSON_CreateDoubleArray(double *numbers, int count) |
| 1084 | { |
| 1085 | int i; |
| 1086 | cJSON *n = 0, *p = 0, *a = cJSON_CreateArray(); |
| 1087 | for (i = 0; a && i < count; i++) |
| 1088 | { |
| 1089 | n = cJSON_CreateDouble((long double)numbers[i], -1); |
| 1090 | if (!i) |
| 1091 | a->child = n; |
| 1092 | else |
| 1093 | suffix_object(p, n); |
| 1094 | p = n; |
| 1095 | } |
| 1096 | return a; |
| 1097 | } |
| 1098 | cJSON *cJSON_CreateStringArray(const char **strings, int count) |
| 1099 | { |
| 1100 | int i; |
nothing calls this directly
no test coverage detected