Re: [PATCH 06/16] reftable/block: rename `block` to `block_data`
- From
Justin Tobler <jltobler@gmail.com>
- Date
- Apr 2, 2025, 20:26 UTC
- Message-ID
- <y3lbo4dnuv46kgy7fhzcksdea2pdm6nsy43tjai6tcgd6b3w5u@w5zqty5tgpmt>
- In-Reply-To
- <20250331-pks-reftable-polishing-v1-6-ebed5247434c@pks.im>
On 25/03/31 10:41AM, Patrick Steinhardt wrote:
Show 21 quoted lines
> 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]
Show 10 quoted lines
> 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.
-Justin