aboutsummaryrefslogtreecommitdiff
path: root/libctf/ChangeLog
diff options
context:
space:
mode:
authorNick Alcock <nick.alcock@oracle.com>2021-02-18 17:03:28 +0000
committerNick Alcock <nick.alcock@oracle.com>2021-03-02 15:09:18 +0000
commitac36e134d96fa71a2f5c141058e06b57bcc72136 (patch)
treee6647d27d24de83a812c7960384abec8a9dcec41 /libctf/ChangeLog
parenteaa2913a7acead8654e7e79ba13c0d22fd70a452 (diff)
downloadbinutils-ac36e134d96fa71a2f5c141058e06b57bcc72136.zip
binutils-ac36e134d96fa71a2f5c141058e06b57bcc72136.tar.gz
binutils-ac36e134d96fa71a2f5c141058e06b57bcc72136.tar.bz2
libctf: reimplement many _iter iterators in terms of _next
Ever since the generator-style _next iterators were introduced, there have been separate implementations of the functional-style _iter iterators that do the same thing as _next. This is annoying and adds more dependencies on the internal guts of the file format. Rip them all out and replace them with the corresponding _next iterators. Only ctf_archive_raw_iter and ctf_label_iter survive, the former because there is no access to the raw binary data of archives via any _next iterator, and the latter because ctf_label_next hasn't been implemented (because labels are currently not used for anything). Tested by reverting the change (already applied) that reimplemented ctf_member_iter in terms of ctf_member_next, then verifying that the _iter and _next iterators produced the same results for every iterable entity within a large type archive. libctf/ChangeLog 2021-03-02 Nick Alcock <nick.alcock@oracle.com> * ctf-types.c (ctf_member_iter): Move 'rc' to an inner scope. (ctf_enum_iter): Reimplement in terms of ctf_enum_next. (ctf_type_iter): Reimplement in terms of ctf_type_next. (ctf_type_iter_all): Likewise. (ctf_variable_iter): Reimplement in terms of ctf_variable_next. * ctf-archive.c (ctf_archive_iter_internal): Remove. (ctf_archive_iter): Reimplement in terms of ctf_archive_next.
Diffstat (limited to 'libctf/ChangeLog')
-rw-r--r--libctf/ChangeLog10
1 files changed, 10 insertions, 0 deletions
diff --git a/libctf/ChangeLog b/libctf/ChangeLog
index db44cae..c639fdd 100644
--- a/libctf/ChangeLog
+++ b/libctf/ChangeLog
@@ -1,5 +1,15 @@
2021-03-02 Nick Alcock <nick.alcock@oracle.com>
+ * ctf-types.c (ctf_member_iter): Move 'rc' to an inner scope.
+ (ctf_enum_iter): Reimplement in terms of ctf_enum_next.
+ (ctf_type_iter): Reimplement in terms of ctf_type_next.
+ (ctf_type_iter_all): Likewise.
+ (ctf_variable_iter): Reimplement in terms of ctf_variable_next.
+ * ctf-archive.c (ctf_archive_iter_internal): Remove.
+ (ctf_archive_iter): Reimplement in terms of ctf_archive_next.
+
+2021-03-02 Nick Alcock <nick.alcock@oracle.com>
+
* ctf-archive.c (ctf_archive_next): Set the name of parents in
single-member archives.