From 2399827bfa1062c7f782499e6dcd9f988318d422 Mon Sep 17 00:00:00 2001 From: Nick Alcock Date: Mon, 8 Jun 2020 09:24:01 +0100 Subject: libctf: add ctf_ref This allows you to bump the refcount on a ctf_file_t, so that you can smuggle it out of iterators which open and close the ctf_file_t for you around the loop body (like ctf_archive_iter). You still can't use this to preserve a ctf_file_t for longer than the lifetime of its containing entity (e.g. ctf_archive). include/ * ctf-api.h (ctf_ref): New. libctf/ * libctf.ver (ctf_ref): New. * ctf-open.c (ctf_ref): Implement it. --- libctf/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libctf/ChangeLog') diff --git a/libctf/ChangeLog b/libctf/ChangeLog index c22cba0..84f82fa 100644 --- a/libctf/ChangeLog +++ b/libctf/ChangeLog @@ -1,5 +1,10 @@ 2020-07-22 Nick Alcock + * libctf.ver (ctf_ref): New. + * ctf-open.c (ctf_ref): Implement it. + +2020-07-22 Nick Alcock + * ctf-inlines.h (ctf_forwardable_kind): New. * ctf-create.c (ctf_add_forward): Use it. -- cgit v1.1