ucx/dlist.c

changeset 121
311cac04d079
parent 103
08018864fb91
equal deleted inserted replaced
120:8170f658f017 121:311cac04d079
127 127
128 return (UcxDlist*)(index == 0 ? e : NULL); 128 return (UcxDlist*)(index == 0 ? e : NULL);
129 } 129 }
130 130
131 int ucx_dlist_contains(UcxDlist *l, void *elem, cmp_func fnc, void *cmpdata) { 131 int ucx_dlist_contains(UcxDlist *l, void *elem, cmp_func fnc, void *cmpdata) {
132 UCX_FOREACH(UcxDlist*, l, e) { 132 UCX_FOREACH(l, e) {
133 if (!fnc(elem, e->data, cmpdata)) { 133 if (!fnc(elem, e->data, cmpdata)) {
134 return 1; 134 return 1;
135 } 135 }
136 } 136 }
137 return 0; 137 return 0;

mercurial