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