diff options
Diffstat (limited to 'object.h')
-rw-r--r-- | object.h | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -19,12 +19,26 @@ struct object_array { */ char *name; unsigned mode; + struct object_context *context; } *objects; }; #define OBJECT_ARRAY_INIT { 0, 0, NULL } #define TYPE_BITS 3 +/* + * object flag allocation: + * revision.h: 0---------10 26 + * fetch-pack.c: 0---4 + * walker.c: 0-2 + * upload-pack.c: 11----------------19 + * builtin/blame.c: 12-13 + * bisect.c: 16 + * bundle.c: 16 + * http-push.c: 16-----19 + * commit.c: 16-----19 + * sha1_name.c: 20 + */ #define FLAG_BITS 27 /* @@ -41,7 +55,14 @@ struct object { extern const char *typename(unsigned int type); extern int type_from_string(const char *str); +/* + * Return the current number of buckets in the object hashmap. + */ extern unsigned int get_max_object_index(void); + +/* + * Return the object from the specified bucket in the object hashmap. + */ extern struct object *get_indexed_object(unsigned int); /* @@ -91,6 +112,7 @@ int object_list_contains(struct object_list *list, struct object *obj); /* Object array handling .. */ void add_object_array(struct object *obj, const char *name, struct object_array *array); void add_object_array_with_mode(struct object *obj, const char *name, struct object_array *array, unsigned mode); +void add_object_array_with_context(struct object *obj, const char *name, struct object_array *array, struct object_context *context); typedef int (*object_array_each_func_t)(struct object_array_entry *, void *); |