diff options
author | Patrick Steinhardt <ps@pks.im> | 2024-11-20 08:51:38 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-11-20 23:59:17 +0100 |
commit | aa248b8ab2ec0dd6e22373b504cfd4ec4b9b970a (patch) | |
tree | 60cceb7032829991118478f3ff55734e4eb6f396 /reftable/block.h | |
parent | reftable/writer: optimize allocations by using a scratch buffer (diff) | |
download | git-aa248b8ab2ec0dd6e22373b504cfd4ec4b9b970a.tar.xz git-aa248b8ab2ec0dd6e22373b504cfd4ec4b9b970a.zip |
reftable/block: rename `block_writer::buf` variable
Adapt the name of the `block_writer::buf` variable to instead be called
`block`. This aligns it with the existing `block_len` variable, which
tracks the length of this buffer, and is generally a bit more tied to
the actual context where this variable gets used.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to '')
-rw-r--r-- | reftable/block.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/reftable/block.h b/reftable/block.h index 9a3effa513..b3f837d612 100644 --- a/reftable/block.h +++ b/reftable/block.h @@ -22,7 +22,7 @@ struct block_writer { unsigned char *compressed; size_t compressed_cap; - uint8_t *buf; + uint8_t *block; uint32_t block_size; /* Offset of the global header. Nonzero in the first block only. */ @@ -43,9 +43,9 @@ struct block_writer { }; /* - * initializes the blockwriter to write `typ` entries, using `buf` as temporary - * storage. `buf` is not owned by the block_writer. */ -int block_writer_init(struct block_writer *bw, uint8_t typ, uint8_t *buf, + * initializes the blockwriter to write `typ` entries, using `block` as temporary + * storage. `block` is not owned by the block_writer. */ +int block_writer_init(struct block_writer *bw, uint8_t typ, uint8_t *block, uint32_t block_size, uint32_t header_off, int hash_size); /* returns the block type (eg. 'r' for ref records. */ |