ucx/dlist.c

changeset 27
22644e2572bc
parent 22
76cdd8209f1f
child 31
91ac86557290
equal deleted inserted replaced
26:59f147baea31 27:22644e2572bc
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;

mercurial