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 /t/unit-tests | |
| parent | b648bd654947db06e5549d724f46d3660ac11e19 (diff) | |
| download | git-1ac4e5e83d997887dcd051c89861292a45a3db8c.tar.gz | |
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 't/unit-tests')
| -rw-r--r-- | t/unit-tests/t-reftable-block.c | 8 | ||||
| -rw-r--r-- | t/unit-tests/t-reftable-readwrite.c | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/t/unit-tests/t-reftable-block.c b/t/unit-tests/t-reftable-block.c index 22040aeefa..8bb4048234 100644 --- a/t/unit-tests/t-reftable-block.c +++ b/t/unit-tests/t-reftable-block.c @@ -100,7 +100,7 @@ static void t_ref_block_read_write(void) block_reader_release(&br); block_iter_close(&it); reftable_record_release(&rec); - reftable_block_done(&br.block); + block_source_return_block(&br.block); reftable_buf_release(&want); reftable_buf_release(&buf); for (i = 0; i < N; i++) @@ -190,7 +190,7 @@ static void t_log_block_read_write(void) block_reader_release(&br); block_iter_close(&it); reftable_record_release(&rec); - reftable_block_done(&br.block); + block_source_return_block(&br.block); reftable_buf_release(&want); reftable_buf_release(&buf); for (i = 0; i < N; i++) @@ -273,7 +273,7 @@ static void t_obj_block_read_write(void) block_reader_release(&br); block_iter_close(&it); reftable_record_release(&rec); - reftable_block_done(&br.block); + block_source_return_block(&br.block); reftable_buf_release(&want); reftable_buf_release(&buf); for (i = 0; i < N; i++) @@ -365,7 +365,7 @@ static void t_index_block_read_write(void) block_reader_release(&br); block_iter_close(&it); reftable_record_release(&rec); - reftable_block_done(&br.block); + block_source_return_block(&br.block); reftable_buf_release(&want); reftable_buf_release(&buf); for (i = 0; i < N; i++) diff --git a/t/unit-tests/t-reftable-readwrite.c b/t/unit-tests/t-reftable-readwrite.c index c4c27242ba..3fba888cda 100644 --- a/t/unit-tests/t-reftable-readwrite.c +++ b/t/unit-tests/t-reftable-readwrite.c @@ -32,13 +32,13 @@ static void t_buffer(void) n = block_source_read_block(&source, &out, 0, sizeof(in)); check_int(n, ==, sizeof(in)); check(!memcmp(in, out.data, n)); - reftable_block_done(&out); + block_source_return_block(&out); n = block_source_read_block(&source, &out, 1, 2); check_int(n, ==, 2); check(!memcmp(out.data, "el", 2)); - reftable_block_done(&out); + block_source_return_block(&out); block_source_close(&source); reftable_buf_release(&buf); } |
