src/array_list.c

changeset 888
6f44b1f1275c
parent 885
878a450e79bd
child 889
f549fd9fbd8f
equal deleted inserted replaced
887:e5181fe13b9c 888:6f44b1f1275c
241 size_t size, 241 size_t size,
242 size_t elem_size, 242 size_t elem_size,
243 void const *elem, 243 void const *elem,
244 cx_compare_func cmp_func 244 cx_compare_func cmp_func
245 ) { 245 ) {
246 // special case: empty array
247 if (size == 0) return 0;
248
246 // declare a variable that will contain the compare results 249 // declare a variable that will contain the compare results
247 int result; 250 int result;
248 251
249 // cast the array pointer to something we can use offsets with 252 // cast the array pointer to something we can use offsets with
250 char const *array = arr; 253 char const *array = arr;

mercurial