From bcbf42b591cccb48430687847904fb01ad33b2c9 Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Tue, 11 Apr 2006 09:13:02 +0000 Subject: [PATCH] foreach_pset macro added [r7619] --- ir/adt/pset.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ir/adt/pset.h b/ir/adt/pset.h index ad1931c27..6265441e2 100644 --- a/ir/adt/pset.h +++ b/ir/adt/pset.h @@ -30,7 +30,7 @@ int pset_default_ptr_cmp(const void *x, const void *y); * The abstract type of a pset (Set of pointers). * * This kind of sets stores only pointer to elements, the elements itself - * must be stored somewere else. + * must be stored somewhere else. * * @see set */ @@ -183,6 +183,14 @@ void *pset_next (pset *pset); */ void pset_break (pset *pset); +/** + * Iterates oven an pset. + * + * @param pset the pset + * @param entry the iterator + */ +#define foreach_pset(pset, entry) for (entry = pset_first(pset); entry; entry = pset_next(set)) + /** * Inserts all elements of the pointer set src into * the set target (union). -- 2.20.1