| 370 cx_array_context_for_qsort = context; |
370 cx_array_context_for_qsort = context; |
| 371 qsort(array, nmemb, size, cx_array_qsort_wrapper); |
371 qsort(array, nmemb, size, cx_array_qsort_wrapper); |
| 372 #endif |
372 #endif |
| 373 } |
373 } |
| 374 |
374 |
| |
375 void cx_array_sort_(CxArray *array, size_t elem_size, |
| |
376 cx_compare_func fn) { |
| |
377 qsort(array->data, array->size, elem_size, fn); |
| |
378 } |
| |
379 |
| |
380 void cx_array_sort_c_(CxArray *array, size_t elem_size, |
| |
381 cx_compare_func2 fn, void *context) { |
| |
382 cx_array_qsort_c(array->data, array->size, elem_size, fn, context); |
| |
383 } |
| |
384 |
| 375 CxIterator cx_array_iterator_(CxArray *array, size_t elem_size) { |
385 CxIterator cx_array_iterator_(CxArray *array, size_t elem_size) { |
| 376 return cxIterator(array->data, elem_size, array->size); |
386 return cxIterator(array->data, elem_size, array->size); |
| 377 } |
387 } |
| 378 |
388 |
| 379 CxIterator cx_array_iterator_ptr_(CxArray *array) { |
389 CxIterator cx_array_iterator_ptr_(CxArray *array) { |