We're about to introduce our own `reftable_buf` type to replace `strbuf`. One function we'll have to convert is `strbuf_addf()`, which is used in a handful of places. This function uses `snprintf()` internally, which makes porting it a bit more involved: - It is not available on all platforms. - Some platforms like Windows have broken implementations. So by using `snprintf()` we'd also push the burden on downstream users of the reftable library to make available a properly working version of it. Most callsites of `strbuf_addf()` are trivial to convert to not using it. We do end up using `snprintf()` in our unit tests, but that isn't much of a problem for downstream users of the reftable library. While at it, remove a useless call to `strbuf_reset()` in `t_reftable_stack_auto_compaction_with_locked_tables()`. We don't write to the buffer before this and initialize it with `STRBUF_INIT`, so there is no need to reset anything. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Taylor Blau <me@ttaylorr.com> |
||
|---|---|---|
| .. | ||
| clar | ||
| .gitignore | ||
| clar-generate.awk | ||
| ctype.c | ||
| lib-oid.c | ||
| lib-oid.h | ||
| lib-reftable.c | ||
| lib-reftable.h | ||
| strvec.c | ||
| t-example-decorate.c | ||
| t-hash.c | ||
| t-hashmap.c | ||
| t-mem-pool.c | ||
| t-oid-array.c | ||
| t-oidmap.c | ||
| t-oidtree.c | ||
| t-prio-queue.c | ||
| t-reftable-basics.c | ||
| t-reftable-block.c | ||
| t-reftable-merged.c | ||
| t-reftable-pq.c | ||
| t-reftable-reader.c | ||
| t-reftable-readwrite.c | ||
| t-reftable-record.c | ||
| t-reftable-stack.c | ||
| t-reftable-tree.c | ||
| t-strbuf.c | ||
| t-strcmp-offset.c | ||
| t-trailer.c | ||
| t-urlmatch-normalization.c | ||
| test-lib.c | ||
| test-lib.h | ||
| unit-test.c | ||
| unit-test.h | ||