diff options
| author | Patrick Steinhardt <ps@pks.im> | 2025-04-07 15:16:15 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-04-07 14:53:09 -0700 |
| commit | 1ac4e5e83d997887dcd051c89861292a45a3db8c (patch) | |
| tree | d843aabb8b472a1f4a523c0552f270b03f784904 /reftable/iter.c | |
| parent | reftable/reader: rename data structure to "table" (diff) | |
| download | git-1ac4e5e83d997887dcd051c89861292a45a3db8c.tar.gz git-1ac4e5e83d997887dcd051c89861292a45a3db8c.zip | |
reftable/blocksource: consolidate code into a single file
The code that implements block sources is distributed across a couple of
files. Consolidate all of it into "reftable/blocksource.c" and its
accompanying header so that it is easier to locate and more self
contained.
While at it, rename some of the functions to have properly scoped names.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'reftable/iter.c')
| -rw-r--r-- | reftable/iter.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/reftable/iter.c b/reftable/iter.c index 7376f263c9..6af6eb4939 100644 --- a/reftable/iter.c +++ b/reftable/iter.c @@ -11,6 +11,7 @@ #include "system.h" #include "block.h" +#include "blocksource.h" #include "constants.h" #include "reftable-error.h" #include "table.h" @@ -113,7 +114,7 @@ static void indexed_table_ref_iter_close(void *p) { struct indexed_table_ref_iter *it = p; block_iter_close(&it->cur); - reftable_block_done(&it->block_reader.block); + block_source_return_block(&it->block_reader.block); reftable_free(it->offsets); reftable_buf_release(&it->oid); } @@ -127,7 +128,7 @@ static int indexed_table_ref_iter_next_block(struct indexed_table_ref_iter *it) return 1; } - reftable_block_done(&it->block_reader.block); + block_source_return_block(&it->block_reader.block); off = it->offsets[it->offset_idx++]; err = table_init_block_reader(it->table, &it->block_reader, off, |
