git/reftable
Han-Wen Nienhuys 66c0dabab5 reftable: make reftable_record a tagged union
This reduces the amount of glue code, because we don't need a void
pointer or vtable within the structure.

The only snag is that reftable_index_record contain a strbuf, so it
cannot be zero-initialized. To address this, use reftable_new_record()
to return fresh instance, given a record type. Since
reftable_new_record() doesn't cause heap allocation anymore, it should
be balanced with reftable_record_release() rather than
reftable_record_destroy().

Thanks to Peff for the suggestion.

Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-01-20 11:31:53 -08:00
..
basics.c reftable: utility functions 2021-10-08 10:45:48 -07:00
basics.h reftable: utility functions 2021-10-08 10:45:48 -07:00
basics_test.c reftable: utility functions 2021-10-08 10:45:48 -07:00
block.c reftable: make reftable_record a tagged union 2022-01-20 11:31:53 -08:00
block.h reftable: reading/writing blocks 2021-10-08 10:45:48 -07:00
block_test.c reftable: make reftable_record a tagged union 2022-01-20 11:31:53 -08:00
blocksource.c reftable: fix resource leak blocksource.c 2022-01-20 11:31:52 -08:00
blocksource.h reftable: add blocksource, an abstraction for random access reads 2021-10-08 10:45:48 -07:00
constants.h reftable: (de)serialization for the polymorphic record type. 2021-10-08 10:45:48 -07:00
dump.c reftable: add dump utility 2021-10-08 10:45:48 -07:00
error.c reftable: add error related functionality 2021-10-08 10:45:48 -07:00
generic.c reftable: make reftable_record a tagged union 2022-01-20 11:31:53 -08:00
generic.h reftable: generic interface to tables 2021-10-08 10:45:48 -07:00
iter.c reftable: make reftable_record a tagged union 2022-01-20 11:31:53 -08:00
iter.h reftable: read reftable files 2021-10-08 10:45:48 -07:00
LICENSE
merged.c reftable: make reftable_record a tagged union 2022-01-20 11:31:53 -08:00
merged.h reftable: add merged table view 2021-10-08 10:45:48 -07:00
merged_test.c reftable: add merged table view 2021-10-08 10:45:48 -07:00
pq.c reftable: make reftable_record a tagged union 2022-01-20 11:31:53 -08:00
pq.h reftable: add a heap-based priority queue for reftable records 2021-10-08 10:45:48 -07:00
pq_test.c reftable: make reftable_record a tagged union 2022-01-20 11:31:53 -08:00
publicbasics.c reftable: utility functions 2021-10-08 10:45:48 -07:00
reader.c reftable: make reftable_record a tagged union 2022-01-20 11:31:53 -08:00
reader.h reftable: read reftable files 2021-10-08 10:45:48 -07:00
readwrite_test.c reftable: drop stray printf in readwrite_test 2022-01-20 11:31:53 -08:00
record.c reftable: make reftable_record a tagged union 2022-01-20 11:31:53 -08:00
record.h reftable: make reftable_record a tagged union 2022-01-20 11:31:53 -08:00
record_test.c reftable: make reftable_record a tagged union 2022-01-20 11:31:53 -08:00
refname.c reftable: implement refname validation 2021-10-08 10:45:48 -07:00
refname.h reftable: implement refname validation 2021-10-08 10:45:48 -07:00
refname_test.c reftable: implement refname validation 2021-10-08 10:45:48 -07:00
reftable-blocksource.h reftable: add blocksource, an abstraction for random access reads 2021-10-08 10:45:48 -07:00
reftable-error.h reftable: add error related functionality 2021-10-08 10:45:48 -07:00
reftable-generic.h reftable: generic interface to tables 2021-10-08 10:45:48 -07:00
reftable-iterator.h reftable: generic interface to tables 2021-10-08 10:45:48 -07:00
reftable-malloc.h reftable: utility functions 2021-10-08 10:45:48 -07:00
reftable-merged.h reftable: add merged table view 2021-10-08 10:45:48 -07:00
reftable-reader.h reftable: read reftable files 2021-10-08 10:45:48 -07:00
reftable-record.h reftable: make reftable-record.h function signatures const correct 2022-01-20 11:31:53 -08:00
reftable-stack.h reftable: implement stack, a mutable database of reftable files. 2021-10-08 10:45:48 -07:00
reftable-tests.h reftable: add a heap-based priority queue for reftable records 2021-10-08 10:45:48 -07:00
reftable-writer.h reftable: write reftable files 2021-10-08 10:45:48 -07:00
stack.c reftable: fix resource warning 2022-01-20 11:31:52 -08:00
stack.h reftable: implement stack, a mutable database of reftable files. 2021-10-08 10:45:48 -07:00
stack_test.c reftable: ignore remove() return value in stack_test.c 2022-01-20 11:31:52 -08:00
system.h reftable: utility functions 2021-10-08 10:45:48 -07:00
test_framework.c reftable: utility functions 2021-10-08 10:45:48 -07:00
test_framework.h reftable: utility functions 2021-10-08 10:45:48 -07:00
tree.c reftable: a generic binary tree implementation 2021-10-08 10:45:48 -07:00
tree.h reftable: a generic binary tree implementation 2021-10-08 10:45:48 -07:00
tree_test.c reftable: a generic binary tree implementation 2021-10-08 10:45:48 -07:00
writer.c reftable: make reftable_record a tagged union 2022-01-20 11:31:53 -08:00
writer.h reftable: write reftable files 2021-10-08 10:45:48 -07:00