src/array_list.c

changeset 614
7aaec630cf15
parent 613
85c08391a090
child 615
b52b66dcd44b
equal deleted inserted replaced
613:85c08391a090 614:7aaec630cf15
230 230
231 static size_t cx_arl_find( 231 static size_t cx_arl_find(
232 struct cx_list_s const *list, 232 struct cx_list_s const *list,
233 void const *elem 233 void const *elem
234 ) { 234 ) {
235 return 0; 235 char *cur = ((cx_array_list const *) list)->data;
236
237 for (size_t i = 0; i < list->size; i++) {
238 if (0 == list->cmpfunc(elem, cur)) {
239 return i;
240 }
241 cur += list->itemsize;
242 }
243
244 return list->size;
236 } 245 }
237 246
238 static void cx_arl_sort(struct cx_list_s *list) { 247 static void cx_arl_sort(struct cx_list_s *list) {
239 248
240 } 249 }

mercurial