110 } |
110 } |
111 |
111 |
112 return s; |
112 return s; |
113 } |
113 } |
114 |
114 |
115 void ucx_dlist_foreach(UcxDlist *l, ucx_callback fnc, void* data) { |
|
116 UcxDlist *e = l; |
|
117 UcxDlist *n; |
|
118 while (e != NULL) { |
|
119 n = e->next; |
|
120 fnc(e, data); |
|
121 e = n; |
|
122 } |
|
123 } |
|
124 |
|
125 /* dlist specific functions */ |
115 /* dlist specific functions */ |
126 UcxDlist *ucx_dlist_first(UcxDlist *l) { |
116 UcxDlist *ucx_dlist_first(UcxDlist *l) { |
127 if (l == NULL) return NULL; |
117 if (l == NULL) return NULL; |
128 |
118 |
129 UcxDlist *e = l; |
119 UcxDlist *e = l; |