93 e = e->next; |
92 e = e->next; |
94 index--; |
93 index--; |
95 } |
94 } |
96 |
95 |
97 return (UcxList*)(index == 0 ? e : NULL); |
96 return (UcxList*)(index == 0 ? e : NULL); |
|
97 } |
|
98 |
|
99 int ucx_list_contains(UcxList *l, void *elem, cmp_func fnc, void *cmpdata) { |
|
100 UCX_FOREACH(UcxList*, l, e) { |
|
101 if (!fnc(elem, e->data, cmpdata)) { |
|
102 return 1; |
|
103 } |
|
104 } |
|
105 return 0; |
98 } |
106 } |
99 |
107 |
100 size_t ucx_list_size(const UcxList *l) { |
108 size_t ucx_list_size(const UcxList *l) { |
101 if (l == NULL) return 0; |
109 if (l == NULL) return 0; |
102 |
110 |