Skip to content

Commit 48929d2

Browse files
pks-tgitster
authored andcommitted
reftable/merged: make merged_iter structure private
The `merged_iter` structure is not used anywhere outside of "merged.c", but is declared in its header. Move it into the code file so that it is clear that its implementation details are never exposed to anything. Signed-off-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5c11529 commit 48929d2

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

reftable/merged.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@ license that can be found in the LICENSE file or at
1717
#include "reftable-error.h"
1818
#include "system.h"
1919

20+
struct merged_iter {
21+
struct reftable_iterator *stack;
22+
uint32_t hash_id;
23+
size_t stack_len;
24+
uint8_t typ;
25+
int suppress_deletions;
26+
struct merged_iter_pqueue pq;
27+
};
28+
2029
static int merged_iter_init(struct merged_iter *mi)
2130
{
2231
for (size_t i = 0; i < mi->stack_len; i++) {

reftable/merged.h

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ license that can be found in the LICENSE file or at
99
#ifndef MERGED_H
1010
#define MERGED_H
1111

12-
#include "pq.h"
12+
#include "system.h"
1313

1414
struct reftable_merged_table {
1515
struct reftable_table *stack;
@@ -24,15 +24,6 @@ struct reftable_merged_table {
2424
uint64_t max;
2525
};
2626

27-
struct merged_iter {
28-
struct reftable_iterator *stack;
29-
uint32_t hash_id;
30-
size_t stack_len;
31-
uint8_t typ;
32-
int suppress_deletions;
33-
struct merged_iter_pqueue pq;
34-
};
35-
3627
void merged_table_release(struct reftable_merged_table *mt);
3728

3829
#endif

0 commit comments

Comments
 (0)