libctf: add ctf_member_count
This returns the number of members in a struct or union, or the number of enumerations in an enum. (This was only available before now by iterating across every member, but it can be returned much faster than that.) include/ * ctf-api.h (ctf_member_count): New. libctf/ * ctf-types.c (ctf_member_count): New. * libctf.ver: New public function.
This commit is contained in:
parent
9b15cbb789
commit
e0325e2ced
5 changed files with 35 additions and 0 deletions
|
@ -349,6 +349,7 @@ extern const char *ctf_label_get (ctf_file_t *);
|
|||
extern const char *ctf_label_topmost (ctf_file_t *);
|
||||
extern int ctf_label_info (ctf_file_t *, const char *, ctf_lblinfo_t *);
|
||||
|
||||
extern int ctf_member_count (ctf_file_t *, ctf_id_t);
|
||||
extern int ctf_member_iter (ctf_file_t *, ctf_id_t, ctf_member_f *, void *);
|
||||
extern int ctf_enum_iter (ctf_file_t *, ctf_id_t, ctf_enum_f *, void *);
|
||||
extern int ctf_type_iter (ctf_file_t *, ctf_type_f *, void *);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue