| 1060 | return a; |
| 1061 | } |
| 1062 | cJSON *cJSON_CreateFloatArray(float *numbers, int count) |
| 1063 | { |
| 1064 | int i; |
| 1065 | cJSON *n = 0, *p = 0, *a = cJSON_CreateArray(); |
| 1066 | for (i = 0; a && i < count; i++) |
| 1067 | { |
| 1068 | n = cJSON_CreateDouble((long double)numbers[i], -1); |
| 1069 | if (!i) |
| 1070 | a->child = n; |
| 1071 | else |
| 1072 | suffix_object(p, n); |
| 1073 | p = n; |
| 1074 | } |
| 1075 | return a; |
| 1076 | } |
| 1077 | cJSON *cJSON_CreateDoubleArray(double *numbers, int count) |
| 1078 | { |
| 1079 | int i; |
nothing calls this directly
no test coverage detected