[CLASSES]: Introduce cus__find_function_by_name
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
This commit is contained in:
parent
7d581ce17c
commit
af9adf0b9a
15
classes.c
15
classes.c
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue