Create Arrays: */
| 1045 | |
| 1046 | /* Create Arrays: */ |
| 1047 | cJSON *cJSON_CreateIntArray(int *numbers, int sign, int count) |
| 1048 | { |
| 1049 | int i; |
| 1050 | cJSON *n = 0, *p = 0, *a = cJSON_CreateArray(); |
| 1051 | for (i = 0; a && i < count; i++) |
| 1052 | { |
| 1053 | n = cJSON_CreateDouble((long double)((unsigned int)numbers[i]), sign); |
| 1054 | if (!i) |
| 1055 | a->child = n; |
| 1056 | else |
| 1057 | suffix_object(p, n); |
| 1058 | p = n; |
| 1059 | } |
| 1060 | return a; |
| 1061 | } |
| 1062 | cJSON *cJSON_CreateFloatArray(float *numbers, int count) |
| 1063 | { |
| 1064 | int i; |
nothing calls this directly
no test coverage detected