src/array_list.c

changeset 647
2e6e9d9f2159
parent 643
5700ba9154ab
child 654
c9d008861178
equal deleted inserted replaced
646:dfd0403ff8b6 647:2e6e9d9f2159
290 list->size--; 290 list->size--;
291 } 291 }
292 return result; 292 return result;
293 } 293 }
294 294
295 static int cx_arl_swap(
296 struct cx_list_s *list,
297 size_t i,
298 size_t j
299 ) {
300 if (i >= list->size || j >= list->size) return 1;
301 cx_array_list *arl = (cx_array_list *) list;
302 cx_array_swap(arl->data, list->itemsize, i, j);
303 return 0;
304 }
305
295 static void *cx_arl_at( 306 static void *cx_arl_at(
296 struct cx_list_s const *list, 307 struct cx_list_s const *list,
297 size_t index 308 size_t index
298 ) { 309 ) {
299 if (index < list->size) { 310 if (index < list->size) {
418 cx_arl_destructor, 429 cx_arl_destructor,
419 cx_arl_insert_element, 430 cx_arl_insert_element,
420 cx_arl_insert_array, 431 cx_arl_insert_array,
421 cx_arl_insert_iter, 432 cx_arl_insert_iter,
422 cx_arl_remove, 433 cx_arl_remove,
434 cx_arl_swap,
423 cx_arl_at, 435 cx_arl_at,
424 cx_arl_find, 436 cx_arl_find,
425 cx_arl_sort, 437 cx_arl_sort,
426 cx_arl_compare, 438 cx_arl_compare,
427 cx_arl_reverse, 439 cx_arl_reverse,

mercurial