diff -r 55fcdff5bcea -r 5f72042eb91c objlist.h --- a/objlist.h Sat Feb 26 22:09:33 2005 +0100 +++ b/objlist.h Sat Feb 26 23:10:51 2005 +0100 @@ -12,6 +12,7 @@ #include "types.h" #include "obj.h" +#include "ptrlist.h" INTRSTRUCT(ObjList); @@ -31,16 +32,11 @@ #define OBJLIST_EMPTY(LIST) objlist_empty(LIST) #define FOR_ALL_ON_OBJLIST(TYPE, VAR, LL, TMP) \ - for(objlist_iter_init(&(TMP), LL), \ - VAR=(TYPE)objlist_iter(&(TMP)); \ - VAR!=NULL; \ - VAR=(TYPE)objlist_iter(&(TMP))) + FOR_ALL_ITER(objlist_iter_init, (TYPE)objlist_iter, VAR, LL, &(TMP)) -#define FOR_ALL_ON_OBJLIST_REV(TYPE, VAR, LL, TMP) \ - for(objlist_iter_rev_init(&(TMP), LL), \ - VAR=(TYPE)objlist_iter_rev(&(TMP)); \ - VAR!=NULL; \ - VAR=(TYPE)objlist_iter_rev(&(TMP))) +#define FOR_ALL_ON_OBJLIST_REV(TYPE, VAR, LL, TMP) \ + FOR_ALL_ITER(objlist_iter_rev_init, \ + (TYPE)objlist_iter_rev, VAR, LL, &(TMP)) #define FOR_ALL_ON_OBJLIST_UNSAFE(TYPE, VAR, LL) \ FOR_ALL_ON_OBJLIST(TYPE, VAR, LL, objlist_iter_tmp)