src/ucx/cx/array_list.h

changeset 438
22eca559aded
parent 436
1260fad21be7
child 490
d218607f5a7e
equal deleted inserted replaced
437:545010bc5e71 438:22eca559aded
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
148 size_t initial_capacity 164 size_t initial_capacity
149 ) __attribute__((__nonnull__)); 165 ) __attribute__((__nonnull__));
150 166
151 167
152 #ifdef __cplusplus 168 #ifdef __cplusplus
153 } /* extern "C" */ 169 } // extern "C"
154 #endif 170 #endif
155 171
156 #endif /* UCX_ARRAY_LIST_H */ 172 #endif // UCX_ARRAY_LIST_H

mercurial