| 682 ); |
682 ); |
| 683 |
683 |
| 684 /** |
684 /** |
| 685 * Allocates an array list for storing elements with @p elem_size bytes each. |
685 * Allocates an array list for storing elements with @p elem_size bytes each. |
| 686 * |
686 * |
| 687 * If @p elem_size is CX_STORE_POINTERS, the created list will be created as if |
687 * If @p elem_size is #CX_STORE_POINTERS, the created list stores pointers instead of |
| 688 * cxListStorePointers() was called immediately after creation and the compare |
688 * copies of the added elements and the compare function will be automatically set |
| 689 * function will be automatically set to cx_cmp_ptr(), if none is given. |
689 * to cx_cmp_ptr(), if none is given. |
| 690 * |
690 * |
| 691 * @param allocator the allocator for allocating the list memory |
691 * @param allocator the allocator for allocating the list memory |
| 692 * (if @c NULL, a default stdlib allocator will be used) |
692 * (if @c NULL, a default stdlib allocator will be used) |
| 693 * @param comparator the comparator for the elements |
693 * @param comparator the comparator for the elements |
| 694 * (if @c NULL, and the list is not storing pointers, sort and find |
694 * (if @c NULL, and the list is not storing pointers, sort and find |
| 712 * |
712 * |
| 713 * The list will use the cxDefaultAllocator and @em NO compare function. |
713 * The list will use the cxDefaultAllocator and @em NO compare function. |
| 714 * If you want to call functions that need a compare function, you have to |
714 * If you want to call functions that need a compare function, you have to |
| 715 * set it immediately after creation or use cxArrayListCreate(). |
715 * set it immediately after creation or use cxArrayListCreate(). |
| 716 * |
716 * |
| 717 * If @p elem_size is CX_STORE_POINTERS, the created list will be created as if |
717 * If @p elem_size is #CX_STORE_POINTERS, the created list stores pointers instead of |
| 718 * cxListStorePointers() was called immediately after creation and the compare |
718 * copies of the added elements and the compare function will be automatically set |
| 719 * function will be automatically set to cx_cmp_ptr(). |
719 * to cx_cmp_ptr(), if none is given. |
| 720 * |
720 * |
| 721 * @param elem_size (@c size_t) the size of each element in bytes |
721 * @param elem_size (@c size_t) the size of each element in bytes |
| 722 * @param initial_capacity (@c size_t) the initial number of elements the array can store |
722 * @param initial_capacity (@c size_t) the initial number of elements the array can store |
| 723 * @return the created list |
723 * @return the created list |
| 724 */ |
724 */ |