Re: [PATCH 06/16] reftable/block: rename `block` to `block_data`
On Wed, Apr 02, 2025 at 03:26:26PM -0500, Justin Tobler wrote:
Show 37 quoted lines
> On 25/03/31 10:41AM, Patrick Steinhardt wrote:
> > The `reftable_block` structure associates a byte slice with a block
> > source. As such it only holds the data of a reftable block without
> > actually encoding any of the details for how to access that data.
> >
> > Rename the structure to instead be called `reftable_block_data`. Besides
> > clarifying that this really only holds data, it also allows us to rename
> > the `reftable_block_reader` to `reftable_block` in the next commit, as
> > this is the structure that actually encapsulates access to the reftable
> > blocks.
> >
> > Signed-off-by: Patrick Steinhardt <ps@pks.im>
> > ---
> > reftable/block.c | 10 ++++-----
> > reftable/block.h | 2 +-
> > reftable/blocksource.c | 44 ++++++++++++++++++-------------------
> > reftable/blocksource.h | 10 ++++-----
> > reftable/iter.c | 4 ++--
> > reftable/reftable-blocksource.h | 14 ++++++------
> > reftable/table.c | 14 ++++++------
> > t/unit-tests/t-reftable-readwrite.c | 10 ++++-----
> > 8 files changed, 54 insertions(+), 54 deletions(-)
> [snip]
> > diff --git a/reftable/block.h b/reftable/block.h
> > index 6afb1b2952a..c55d47c3c52 100644
> > --- a/reftable/block.h
> > +++ b/reftable/block.h
> > @@ -71,7 +71,7 @@ struct block_reader {
> > uint32_t header_off;
> >
> > /* the memory block */
> > - struct reftable_block block;
> > + struct reftable_block_data block;
>
> I wonder if we should rename the `reftable_block_data` here from `block`
> to `data`. In the next commit we rename `block_reader` to `block` which
> leads to `block->block` in some places which I think looks a bit funny.Fair. Will rename it to `block_data` though to match the struct name.
Patrick