940 static void cx_arl_iter_next(void *it) { |
940 static void cx_arl_iter_next(void *it) { |
941 struct cx_iterator_s *iter = it; |
941 struct cx_iterator_s *iter = it; |
942 if (iter->base.remove) { |
942 if (iter->base.remove) { |
943 iter->base.remove = false; |
943 iter->base.remove = false; |
944 cx_arl_remove(iter->src_handle.m, iter->index, 1, NULL); |
944 cx_arl_remove(iter->src_handle.m, iter->index, 1, NULL); |
|
945 iter->elem_count--; |
945 } else { |
946 } else { |
946 iter->index++; |
947 iter->index++; |
947 iter->elem_handle = |
948 iter->elem_handle = |
948 ((char *) iter->elem_handle) |
949 ((char *) iter->elem_handle) |
949 + ((const struct cx_list_s *) iter->src_handle.c)->collection.elem_size; |
950 + ((const struct cx_list_s *) iter->src_handle.c)->collection.elem_size; |
954 struct cx_iterator_s *iter = it; |
955 struct cx_iterator_s *iter = it; |
955 const cx_array_list *list = iter->src_handle.c; |
956 const cx_array_list *list = iter->src_handle.c; |
956 if (iter->base.remove) { |
957 if (iter->base.remove) { |
957 iter->base.remove = false; |
958 iter->base.remove = false; |
958 cx_arl_remove(iter->src_handle.m, iter->index, 1, NULL); |
959 cx_arl_remove(iter->src_handle.m, iter->index, 1, NULL); |
|
960 iter->elem_count--; |
959 } |
961 } |
960 iter->index--; |
962 iter->index--; |
961 if (iter->index < list->base.collection.size) { |
963 if (iter->index < list->base.collection.size) { |
962 iter->elem_handle = ((char *) list->data) |
964 iter->elem_handle = ((char *) list->data) |
963 + iter->index * list->base.collection.elem_size; |
965 + iter->index * list->base.collection.elem_size; |