src/cx/array_list.h

changeset 1621
c52a4c67e29e
parent 1620
bf5d647f939d
child 1622
27e7a4bf1a39
equal deleted inserted replaced
1620:bf5d647f939d 1621:c52a4c67e29e
558 */ 558 */
559 CX_EXPORT void cx_array_qsort_c(void *array, size_t nmemb, size_t size, 559 CX_EXPORT void cx_array_qsort_c(void *array, size_t nmemb, size_t size,
560 cx_compare_func2 fn, void *context); 560 cx_compare_func2 fn, void *context);
561 561
562 /** 562 /**
563 * Sorts an array.
564 *
565 * Internal function - do not use.
566 *
567 * @param array a pointer to the array structure
568 * @param elem_size the size of one element
569 * @param fn the compare function
570 */
571 CX_EXPORT void cx_array_sort_(CxArray *array, size_t elem_size,
572 cx_compare_func fn);
573
574 /**
575 * Sorts an array.
576 *
577 * Internal function - do not use.
578 *
579 * @param array a pointer to the array structure
580 * @param elem_size the size of one element
581 * @param fn the compare function
582 * @param context the context for the compare function
583 */
584 CX_EXPORT void cx_array_sort_c_(CxArray *array, size_t elem_size,
585 cx_compare_func2 fn, void *context);
586
587 /**
588 * Sorts an array.
589 *
590 * @param array the name of the array
591 * @param fn (@c cx_compare_func) the compare function
592 * @param context (@c void*) the context for the compare function
593 */
594 #define cx_array_sort(array, fn) \
595 cx_array_sort_((CxArray*)&(array), sizeof((array).data[0]), fn)
596
597 /**
598 * Sorts an array.
599 *
600 * @param array the name of the array
601 * @param fn (@c cx_compare_func2) the compare function
602 * @param context (@c void*) the context for the compare function
603 */
604 #define cx_array_sort_c(array, fn, context) \
605 cx_array_sort_c_((CxArray*)&(array), sizeof((array).data[0]), fn, context)
606
607 /**
563 * Creates an iterator over the elements of an array. 608 * Creates an iterator over the elements of an array.
564 * 609 *
565 * Internal function - do not use. 610 * Internal function - do not use.
566 * 611 *
567 * @param array a pointer to the array structure 612 * @param array a pointer to the array structure

mercurial