diff -r dfd0403ff8b6 -r 2e6e9d9f2159 src/array_list.c --- a/src/array_list.c Wed Feb 08 18:56:58 2023 +0100 +++ b/src/array_list.c Wed Feb 08 20:26:09 2023 +0100 @@ -292,6 +292,17 @@ return result; } +static int cx_arl_swap( + struct cx_list_s *list, + size_t i, + size_t j +) { + if (i >= list->size || j >= list->size) return 1; + cx_array_list *arl = (cx_array_list *) list; + cx_array_swap(arl->data, list->itemsize, i, j); + return 0; +} + static void *cx_arl_at( struct cx_list_s const *list, size_t index @@ -420,6 +431,7 @@ cx_arl_insert_array, cx_arl_insert_iter, cx_arl_remove, + cx_arl_swap, cx_arl_at, cx_arl_find, cx_arl_sort,