325 ((char *) arl->data) + (index + 1) * list->item_size, |
325 ((char *) arl->data) + (index + 1) * list->item_size, |
326 list->item_size, |
326 list->item_size, |
327 list->size - index - 1, |
327 list->size - index - 1, |
328 &arl->reallocator |
328 &arl->reallocator |
329 ); |
329 ); |
330 if (result == 0) { |
330 |
331 // decrease the size |
331 // cx_array_copy cannot fail, array cannot grow |
332 list->size--; |
332 assert(result == 0); |
333 } |
333 |
334 return result; |
334 // decrease the size |
|
335 list->size--; |
|
336 |
|
337 return 0; |
335 } |
338 } |
336 |
339 |
337 static void cx_arl_clear(struct cx_list_s *list) { |
340 static void cx_arl_clear(struct cx_list_s *list) { |
338 if (list->size == 0) return; |
341 if (list->size == 0) return; |
339 |
342 |