src/cx/array_list.h

changeset 623
21082350a590
parent 617
cec11387c1be
child 628
1e2be40f0cb5
equal deleted inserted replaced
622:3d93cd78aa20 623:21082350a590
130 size_t elem_size, 130 size_t elem_size,
131 size_t elem_count, 131 size_t elem_count,
132 struct cx_array_reallocator_s *reallocator 132 struct cx_array_reallocator_s *reallocator
133 ) __attribute__((__nonnull__(1, 2, 5))); 133 ) __attribute__((__nonnull__(1, 2, 5)));
134 134
135
136 /**
137 * Swaps two array elements.
138 *
139 * @param arr the array
140 * @param elem_size the element size
141 * @param idx1 index of first element
142 * @param idx2 index of second element
143 */
144 void cx_array_swap(
145 void *arr,
146 size_t elem_size,
147 size_t idx1,
148 size_t idx2
149 ) __attribute__((__nonnull__));
150
135 /** 151 /**
136 * Allocates an array list for storing elements with \p item_size bytes each. 152 * Allocates an array list for storing elements with \p item_size bytes each.
137 * 153 *
138 * @param allocator the allocator for allocating the list memory 154 * @param allocator the allocator for allocating the list memory
139 * @param comparator the comparator for the elements 155 * @param comparator the comparator for the elements

mercurial