Create Arrays: */
| 831 | |
| 832 | /* Create Arrays: */ |
| 833 | cJSON *cJSON_CreateIntArray(int *numbers, int sign, int count) { |
| 834 | int i; |
| 835 | cJSON *n = 0, *p = 0, *a = cJSON_CreateArray(); |
| 836 | for (i = 0; a && i < count; i++) { |
| 837 | n = cJSON_CreateDouble((long double)((unsigned int)numbers[i]), sign); |
| 838 | if (!i) { |
| 839 | a->child = n; |
| 840 | } else { |
| 841 | suffix_object(p, n); |
| 842 | } |
| 843 | p = n; |
| 844 | } |
| 845 | return a; |
| 846 | } |
| 847 | cJSON *cJSON_CreateFloatArray(float *numbers, int count) { |
| 848 | int i; |
| 849 | cJSON *n = 0, *p = 0, *a = cJSON_CreateArray(); |
nothing calls this directly
no test coverage detected