diff options
author | Patrick Steinhardt <ps@pks.im> | 2024-10-17 06:53:50 +0200 |
---|---|---|
committer | Taylor Blau <me@ttaylorr.com> | 2024-10-17 22:59:55 +0200 |
commit | 81eddda540eae43ef481b629d7f4d8023ea40c57 (patch) | |
tree | 576098c42ea01e40540ea9076c1ff02b004c4ec3 /reftable/system.h | |
parent | reftable: stop using `strbuf_addf()` (diff) | |
download | git-81eddda540eae43ef481b629d7f4d8023ea40c57.tar.xz git-81eddda540eae43ef481b629d7f4d8023ea40c57.zip |
reftable/basics: provide new `reftable_buf` interface
Implement a new `reftable_buf` interface that will replace Git's own
`strbuf` interface. This is done due to three reasons:
- The `strbuf` interfaces do not handle memory allocation failures and
instead causes us to die. This is okay in the context of Git, but is
not in the context of the reftable library, which is supposed to be
usable by third-party applications.
- The `strbuf` interface is quite deeply tied into Git, which makes it
hard to use the reftable library as a standalone library. Any
dependent would have to carefully extract the relevant parts of it
to make things work, which is not all that sensible.
- The `strbuf` interface does not use the pluggable allocators that
can be set up via `reftable_set_alloc()`.
So we have good reasons to use our own type, and the implementation is
rather trivial. Implement our own type. Conversion of the reftable
library will be handled in subsequent commits.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Diffstat (limited to 'reftable/system.h')
0 files changed, 0 insertions, 0 deletions