Commit 3b47b098 3b47b098b1f1de0ce7220ff5e0453937946b6750 by Sergey Poznyakoff

(struct _iterator): Rewritten

(iterator_advance): New function.
1 parent 9610a1ee
...@@ -30,9 +30,10 @@ extern "C" { ...@@ -30,9 +30,10 @@ extern "C" {
30 30
31 struct _iterator 31 struct _iterator
32 { 32 {
33 list_t list; 33 struct _iterator *next; /* Next iterator in the chain */
34 size_t index; 34 list_t list; /* Owner list */
35 35 struct list_data *cur; /* Current list item */
36 int is_advanced; /* Is the item already advanced */
36 }; 37 };
37 38
38 39
...@@ -40,4 +41,6 @@ struct _iterator ...@@ -40,4 +41,6 @@ struct _iterator
40 } 41 }
41 #endif 42 #endif
42 43
44 extern void iterator_advance(iterator_t iterator, struct list_data *e);
45
43 #endif /* _ITERATOR0_H */ 46 #endif /* _ITERATOR0_H */
......