[CLASSES]: Pass the cookie to the filter in cu__for_each_function
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
This commit is contained in:
parent
5484abff49
commit
5cb0779231
|
@ -1191,7 +1191,8 @@ int cu__for_each_class(struct cu *self,
|
|||
int cu__for_each_function(struct cu *cu,
|
||||
int (*iterator)(struct function *func, void *cookie),
|
||||
void *cookie,
|
||||
struct function *(*filter)(struct function *function))
|
||||
struct function *(*filter)(struct function *function,
|
||||
void *cookie))
|
||||
{
|
||||
|
||||
struct function *pos;
|
||||
|
@ -1199,7 +1200,7 @@ int cu__for_each_function(struct cu *cu,
|
|||
list_for_each_entry(pos, &cu->functions, tag.node) {
|
||||
struct function *function = pos;
|
||||
if (filter != NULL) {
|
||||
function = filter(pos);
|
||||
function = filter(pos, cookie);
|
||||
if (function == NULL)
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -166,7 +166,8 @@ extern int cu__for_each_function(struct cu *cu,
|
|||
int (*iterator)(struct function *func,
|
||||
void *cookie),
|
||||
void *cookie,
|
||||
struct function *(*filter)(struct function *function));
|
||||
struct function *(*filter)(struct function *function,
|
||||
void *cookie));
|
||||
extern void cus__for_each_cu(struct cus *self,
|
||||
int (*iterator)(struct cu *cu,
|
||||
void *cookie),
|
||||
|
|
Loading…
Reference in New Issue