From: Michael Beck Date: Tue, 11 Apr 2006 09:13:02 +0000 (+0000) Subject: foreach_pset macro added X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=bcbf42b591cccb48430687847904fb01ad33b2c9;p=libfirm foreach_pset macro added [r7619] --- 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).