aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/llist.h3
-rw-r--r--src/llist_ts.h3
2 files changed, 6 insertions, 0 deletions
diff --git a/src/llist.h b/src/llist.h
index 91a8632..8833c66 100644
--- a/src/llist.h
+++ b/src/llist.h
@@ -86,6 +86,9 @@ llist_item_t *llist_find_nth (llist_t *, int, long, llist_fn_match_t);
#define LLIST_FIND_FOREACH(l, data, fn_match, i) \
for (i = LLIST_FIND_FIRST (l, data, fn_match); i; \
i = LLIST_FIND_NEXT (i, data, fn_match))
+#define LLIST_FIND_FOREACH_CONT(l, data, fn_match, i) \
+ for (i = LLIST_FIND_FIRST (l, data, fn_match); i; \
+ i = LLIST_NEXT_FILTER (i, data, fn_match))
/* Accessing list item data. */
void *llist_get_data (llist_item_t *);
diff --git a/src/llist_ts.h b/src/llist_ts.h
index e152f5d..0822a3d 100644
--- a/src/llist_ts.h
+++ b/src/llist_ts.h
@@ -78,6 +78,9 @@ struct llist_ts {
#define LLIST_TS_FIND_FOREACH(l_ts, data, fn_match, i) \
for (i = LLIST_TS_FIND_FIRST (l_ts, data, fn_match); i; \
i = LLIST_TS_FIND_NEXT (i, data, fn_match))
+#define LLIST_TS_FIND_FOREACH_CONT(l_ts, data, fn_match, i) \
+ for (i = LLIST_TS_FIND_FIRST (l_ts, data, fn_match); i; \
+ i = LLIST_TS_NEXT_FILTER (i, data, fn_match))
/* Accessing list item data. */
#define LLIST_TS_GET_DATA(i) llist_get_data (i)