ucx/list.c

changeset 22
76cdd8209f1f
parent 18
69636f81db31
child 23
ccc294fafb9b
equal deleted inserted replaced
21:d599fefc7620 22:76cdd8209f1f
108 return s; 108 return s;
109 } 109 }
110 110
111 void ucx_list_foreach(UcxList *l, ucx_callback fnc, void* data) { 111 void ucx_list_foreach(UcxList *l, ucx_callback fnc, void* data) {
112 UcxList *e = l; 112 UcxList *e = l;
113 UcxList *n;
113 while (e != NULL) { 114 while (e != NULL) {
115 n = e->next;
114 fnc(e, data); 116 fnc(e, data);
115 e = e->next; 117 e = n;
116 } 118 }
117 } 119 }

mercurial