@@ -192,7 +192,7 @@ static void iterator_from_merged_iter(struct reftable_iterator *it,
it->ops = &merged_iter_vtable;
}
-int reftable_new_merged_table(struct reftable_merged_table **dest,
+int reftable_merged_table_new(struct reftable_merged_table **dest,
struct reftable_table *stack, size_t n,
uint32_t hash_id)
{
@@ -29,10 +29,11 @@ struct reftable_merged_table;
/* A generic reftable; see below. */
struct reftable_table;
-/* reftable_new_merged_table creates a new merged table. It takes ownership of
- the stack array.
-*/
-int reftable_new_merged_table(struct reftable_merged_table **dest,
+/*
+ * reftable_merged_table_new creates a new merged table. It takes ownership of
+ * the stack array.
+ */
+int reftable_merged_table_new(struct reftable_merged_table **dest,
struct reftable_table *stack, size_t n,
uint32_t hash_id);
@@ -272,7 +272,7 @@ static int reftable_stack_reload_once(struct reftable_stack *st,
}
/* success! */
- err = reftable_new_merged_table(&new_merged, new_tables,
+ err = reftable_merged_table_new(&new_merged, new_tables,
new_readers_len, st->opts.hash_id);
if (err < 0)
goto done;
@@ -924,7 +924,7 @@ static int stack_write_compact(struct reftable_stack *st,
reftable_writer_set_limits(wr, st->readers[first]->min_update_index,
st->readers[last]->max_update_index);
- err = reftable_new_merged_table(&mt, subtabs, subtabs_len,
+ err = reftable_merged_table_new(&mt, subtabs, subtabs_len,
st->opts.hash_id);
if (err < 0) {
reftable_free(subtabs);
@@ -111,7 +111,7 @@ merged_table_from_records(struct reftable_ref_record **refs,
reftable_table_from_reader(&tabs[i], (*readers)[i]);
}
- err = reftable_new_merged_table(&mt, tabs, n, GIT_SHA1_FORMAT_ID);
+ err = reftable_merged_table_new(&mt, tabs, n, GIT_SHA1_FORMAT_ID);
check(!err);
return mt;
}
@@ -289,7 +289,7 @@ merged_table_from_log_records(struct reftable_log_record **logs,
reftable_table_from_reader(&tabs[i], (*readers)[i]);
}
- err = reftable_new_merged_table(&mt, tabs, n, GIT_SHA1_FORMAT_ID);
+ err = reftable_merged_table_new(&mt, tabs, n, GIT_SHA1_FORMAT_ID);
check(!err);
return mt;
}
@@ -441,9 +441,9 @@ static void t_default_write_opts(void)
check_int(hash_id, ==, GIT_SHA1_FORMAT_ID);
reftable_table_from_reader(&tab[0], rd);
- err = reftable_new_merged_table(&merged, tab, 1, GIT_SHA256_FORMAT_ID);
+ err = reftable_merged_table_new(&merged, tab, 1, GIT_SHA256_FORMAT_ID);
check_int(err, ==, REFTABLE_FORMAT_ERROR);
- err = reftable_new_merged_table(&merged, tab, 1, GIT_SHA1_FORMAT_ID);
+ err = reftable_merged_table_new(&merged, tab, 1, GIT_SHA1_FORMAT_ID);
check(!err);
reftable_reader_free(rd);
Rename `reftable_new_merged_table()` to `reftable_merged_table_new()` such that the name matches our coding style. Signed-off-by: Patrick Steinhardt <ps@pks.im> --- reftable/merged.c | 2 +- reftable/reftable-merged.h | 9 +++++---- reftable/stack.c | 4 ++-- t/unit-tests/t-reftable-merged.c | 8 ++++---- 4 files changed, 12 insertions(+), 11 deletions(-)