forked from Imagelibrary/binutils-gdb
libctf: drop LCTF_TYPE_ISPARENT/LCTF_TYPE_ISCHILD
Parent/child determination is about to become rather more complex, making a macro impractical. Use the ctf_type_isparent/ischild function calls everywhere and remove the macro. Make them more const-correct too, to make them more widely usable. While we're about it, change several places that hand-implemented ctf_get_dict() to call it instead, and armour several functions against the null returns that were always possible in this case (but previously unprotected-against).
This commit is contained in:
@@ -473,8 +473,8 @@ extern void ctf_dict_close (ctf_dict_t *);
|
||||
extern const char *ctf_cuname (ctf_dict_t *);
|
||||
extern ctf_dict_t *ctf_parent_dict (ctf_dict_t *);
|
||||
extern const char *ctf_parent_name (ctf_dict_t *);
|
||||
extern int ctf_type_isparent (ctf_dict_t *, ctf_id_t);
|
||||
extern int ctf_type_ischild (ctf_dict_t *, ctf_id_t);
|
||||
extern int ctf_type_isparent (const ctf_dict_t *, ctf_id_t);
|
||||
extern int ctf_type_ischild (const ctf_dict_t *, ctf_id_t);
|
||||
extern int ctf_import (ctf_dict_t *, ctf_dict_t *);
|
||||
|
||||
/* Set these names (used when creating dicts). */
|
||||
|
||||
Reference in New Issue
Block a user