From 534444b1ee161f342d303fd6549310963ce233c9 Mon Sep 17 00:00:00 2001 From: Nick Alcock Date: Thu, 18 Mar 2021 12:37:52 +0000 Subject: libctf: eliminate dtd_u, part 2: arrays This is even simpler than ints, floats and slices, with the only extra complication being the need to manually transfer the array parameter in the rarely-used function ctf_set_array. (Arrays are unique in libctf in that they can be modified post facto, not just created and appended to. I'm not sure why they got this exemption, but it's easy to maintain.) libctf/ChangeLog 2021-03-18 Nick Alcock * ctf-impl.h (ctf_dtdef_t) : Remove. * ctf-create.c (ctf_add_array): Use the dtd_vlen, not dtu_arr. (ctf_set_array): Likewise. * ctf-serialize.c (ctf_emit_type_sect): Just copy the dtd_vlen. * ctf-types.c (ctf_array_info): Just use the vlen. --- libctf/ctf-impl.h | 1 - 1 file changed, 1 deletion(-) (limited to 'libctf/ctf-impl.h') diff --git a/libctf/ctf-impl.h b/libctf/ctf-impl.h index 742b4b3..c1ce50b 100644 --- a/libctf/ctf-impl.h +++ b/libctf/ctf-impl.h @@ -196,7 +196,6 @@ typedef struct ctf_dtdef union { ctf_list_t dtu_members; /* struct, union, or enum */ - ctf_arinfo_t dtu_arr; /* array */ uint32_t *dtu_argv; /* function */ } dtd_u; } ctf_dtdef_t; -- cgit v1.1