[CLASSES]: Introduce cus__find_function_by_name

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
This commit is contained in:
Arnaldo Carvalho de Melo 2006-12-23 18:46:05 -02:00
parent 7d581ce17c
commit af9adf0b9a
2 changed files with 17 additions and 0 deletions

View File

@ -289,6 +289,21 @@ struct class *cus__find_class_by_name(const struct cus *self, const char *name)
return NULL;
}
struct function *cus__find_function_by_name(const struct cus *self,
const char *name)
{
struct cu *pos;
list_for_each_entry(pos, &self->cus, node) {
struct function *function = cu__find_function_by_name(pos, name);
if (function != NULL)
return function;
}
return NULL;
}
struct cu *cus__find_cu_by_name(const struct cus *self, const char *name)
{
struct cu *pos;

View File

@ -154,6 +154,8 @@ extern struct cus *cus__new(void);
extern int cus__load(struct cus *self, const char *filename);
extern struct cu *cus__find_cu_by_name(const struct cus *self,
const char *name);
extern struct function *cus__find_function_by_name(const struct cus *self,
const char *name);
extern struct class *cu__find_class_by_id(const struct cu *cu,
const uint64_t type);
extern struct class *cu__find_class_by_name(const struct cu *cu,