core: Introduce ftype__for_each_parameter_safe

Will be used by ftype__delete.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Arnaldo Carvalho de Melo 2009-03-25 11:39:26 -03:00
parent ed0c3ae7d1
commit 49256cfd84
1 changed files with 9 additions and 0 deletions

View File

@ -519,6 +519,15 @@ static inline struct ftype *tag__ftype(const struct tag *self)
#define ftype__for_each_parameter(self, pos) \
list_for_each_entry(pos, &(self)->parms, tag.node)
/**
* ftype__for_each_parameter_safe - safely iterate thru all the parameters
* @self: struct ftype instance to iterate
* @pos: struct parameter iterator
* @n: struct parameter temp iterator
*/
#define ftype__for_each_parameter_safe(self, pos, n) \
list_for_each_entry_safe(pos, n, &(self)->parms, tag.node)
void ftype__add_parameter(struct ftype *self, struct parameter *parm);
size_t ftype__fprintf(const struct ftype *self, const struct cu *cu,
const char *name, const int inlined,