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