]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
libctf: drop LCTF_TYPE_ISPARENT/LCTF_TYPE_ISCHILD
authorNick Alcock <nick.alcock@oracle.com>
Wed, 29 Jan 2025 12:30:58 +0000 (12:30 +0000)
committerNick Alcock <nick.alcock@oracle.com>
Fri, 28 Feb 2025 15:13:24 +0000 (15:13 +0000)
commitb875301e748200429b92303fa0f2a754ff9d439f
tree66d033eb6c490ca3b8758e016400d71b7766816c
parent9835747b21aa065804d3bdcf37a5dbb88ac46992
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).
include/ctf-api.h
libctf/ctf-create.c
libctf/ctf-dedup.c
libctf/ctf-impl.h
libctf/ctf-lookup.c
libctf/ctf-open.c
libctf/ctf-types.c