Re: [PATCH 01/10] reftable/merged: expose functions to initialize iterators

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Patrick Steinhardt <ps@xxxxxx> writes:

> We do not expose any functions via our public headers that would allow a
> caller to initialize a reftable iterator from a merged table. Instead,
> they are expected to go via the generic `reftable_table` interface,
> which is somewhat roundabout.
>
> Implement two new functions to initialize iterators for ref and log
> records to plug this gap.
>
> Signed-off-by: Patrick Steinhardt <ps@xxxxxx>
> ---
>  reftable/merged.c          | 12 ++++++++++++
>  reftable/reftable-merged.h |  8 ++++++++
>  2 files changed, 20 insertions(+)
>
> diff --git a/reftable/merged.c b/reftable/merged.c
> index 6adce44f4b..8d78b3da71 100644
> --- a/reftable/merged.c
> +++ b/reftable/merged.c
> @@ -254,6 +254,18 @@ void merged_table_init_iter(struct reftable_merged_table *mt,
>  	iterator_from_merged_iter(it, mi);
>  }
>
> +void reftable_merged_table_init_ref_iterator(struct reftable_merged_table *mt,
> +					     struct reftable_iterator *it)
> +{
> +	merged_table_init_iter(mt, it, BLOCK_TYPE_REF);
> +}
> +
> +void reftable_merged_table_init_log_iterator(struct reftable_merged_table *mt,
> +					     struct reftable_iterator *it)
> +{
> +	merged_table_init_iter(mt, it, BLOCK_TYPE_LOG);
> +}
> +

These too look similar to `static void
reftable_merged_table_init_iter_void` defined a little below, I wonder
if we could have simply exposed that? Perhaps we remove it in the
upcoming patches.

[snip]

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux