aboutsummaryrefslogtreecommitdiffstats
path: root/reftable/iter.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-04-29 14:21:29 -0700
committerJunio C Hamano <gitster@pobox.com>2025-04-29 14:21:30 -0700
commita819a3da85655031a23abae0f75d0910697fb92c (patch)
tree331210d9a90bec12fd6a8f1c7427c6a388fd6c80 /reftable/iter.h
parentMerge branch 'jh/gc-launchctl-schedule-fix' (diff)
parentreftable/table: move printing logic into test helper (diff)
downloadgit-a819a3da85655031a23abae0f75d0910697fb92c.tar.gz
git-a819a3da85655031a23abae0f75d0910697fb92c.zip
Merge branch 'ps/reftable-api-revamp'
Overhaul of the reftable API. * ps/reftable-api-revamp: reftable/table: move printing logic into test helper reftable/constants: make block types part of the public interface reftable/table: introduce iterator for table blocks reftable/table: add `reftable_table` to the public interface reftable/block: expose a generic iterator over reftable records reftable/block: make block iterators reseekable reftable/block: store block pointer in the block iterator reftable/block: create public interface for reading blocks git-zlib: use `struct z_stream_s` instead of typedef reftable/block: rename `block_reader` to `reftable_block` reftable/block: rename `block` to `block_data` reftable/table: move reading block into block reader reftable/block: simplify how we track restart points reftable/blocksource: consolidate code into a single file reftable/reader: rename data structure to "table" reftable: fix formatting of the license header
Diffstat (limited to 'reftable/iter.h')
-rw-r--r--reftable/iter.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/reftable/iter.h b/reftable/iter.h
index 40f98893b8..cc920970a5 100644
--- a/reftable/iter.h
+++ b/reftable/iter.h
@@ -1,10 +1,10 @@
/*
-Copyright 2020 Google LLC
-
-Use of this source code is governed by a BSD-style
-license that can be found in the LICENSE file or at
-https://developers.google.com/open-source/licenses/bsd
-*/
+ * Copyright 2020 Google LLC
+ *
+ * Use of this source code is governed by a BSD-style
+ * license that can be found in the LICENSE file or at
+ * https://developers.google.com/open-source/licenses/bsd
+ */
#ifndef ITER_H
#define ITER_H
@@ -59,7 +59,7 @@ void iterator_from_filtering_ref_iterator(struct reftable_iterator *,
* but using the object index.
*/
struct indexed_table_ref_iter {
- struct reftable_reader *r;
+ struct reftable_table *table;
struct reftable_buf oid;
/* mutable */
@@ -68,7 +68,7 @@ struct indexed_table_ref_iter {
/* Points to the next offset to read. */
int offset_idx;
int offset_len;
- struct block_reader block_reader;
+ struct reftable_block block;
struct block_iter cur;
int is_finished;
};
@@ -83,7 +83,7 @@ void iterator_from_indexed_table_ref_iter(struct reftable_iterator *it,
/* Takes ownership of `offsets` */
int indexed_table_ref_iter_new(struct indexed_table_ref_iter **dest,
- struct reftable_reader *r, uint8_t *oid,
+ struct reftable_table *t, uint8_t *oid,
int oid_len, uint64_t *offsets, int offset_len);
#endif