1 #ifndef INCLUDE_objecttable_h__
2 #define INCLUDE_objecttable_h__
4 #include "git/common.h"
7 struct git_revpool_object
13 struct git_revpool_node
15 struct git_revpool_object
*object
;
17 struct git_revpool_node
*next
;
20 struct git_revpool_table
22 struct git_revpool_node
**nodes
;
24 unsigned int size_mask
;
26 unsigned int max_count
;
29 struct git_revpool_tableit
31 struct git_revpool_node
**nodes
;
32 struct git_revpool_node
*current_node
;
33 unsigned int current_pos
;
38 typedef struct git_revpool_node git_revpool_node
;
39 typedef struct git_revpool_object git_revpool_object
;
40 typedef struct git_revpool_table git_revpool_table
;
41 typedef struct git_revpool_tableit git_revpool_tableit
;
43 git_revpool_table
*git_revpool_table_create(unsigned int min_size
);
44 int git_revpool_table_insert(git_revpool_table
*table
, git_revpool_object
*object
);
45 git_revpool_object
*git_revpool_table_lookup(git_revpool_table
*table
, const git_oid
*id
);
46 void git_revpool_table_resize(git_revpool_table
*table
);
47 void git_revpool_table_free(git_revpool_table
*table
);
50 git_revpool_object
*git_revpool_tableit_next(git_revpool_tableit
*it
);
51 void git_revpool_tableit_init(git_revpool_table
*table
, git_revpool_tableit
*it
);