X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=object.h;h=036bd66fe9b6591e959e6df51160e636ab1a682e;hb=e8e29c7b5507ed97067391490adbeeca2b1bca34;hp=bdbf0facd47015b61a6fbf25eb358b6e256c86b6;hpb=c379c4b176ce350a8d6c0773a3ad211996d809db;p=git.git diff --git a/object.h b/object.h index bdbf0facd..036bd66fe 100644 --- a/object.h +++ b/object.h @@ -8,7 +8,6 @@ struct object_list { struct object_refs { unsigned count; - struct object *base; struct object *ref[FLEX_ARRAY]; /* more */ }; @@ -18,6 +17,7 @@ struct object_array { struct object_array_entry { struct object *item; const char *name; + unsigned mode; } *objects; }; @@ -35,19 +35,16 @@ struct object { unsigned char sha1[20]; }; -extern int track_object_refs; - extern const char *typename(unsigned int type); extern int type_from_string(const char *str); extern unsigned int get_max_object_index(void); extern struct object *get_indexed_object(unsigned int); -extern struct object_refs *lookup_object_refs(struct object *); /** Internal only **/ struct object *lookup_object(const unsigned char *sha1); -void created_object(const unsigned char *sha1, struct object *obj); +extern void *create_object(const unsigned char *sha1, int type, void *obj); /** Returns the object, having parsed it to find out what it is. **/ struct object *parse_object(const unsigned char *sha1); @@ -61,12 +58,7 @@ struct object *parse_object_buffer(const unsigned char *sha1, enum object_type t /** Returns the object, with potentially excess memory allocated. **/ struct object *lookup_unknown_object(const unsigned char *sha1); -struct object_refs *alloc_object_refs(unsigned count); -void set_object_refs(struct object *obj, struct object_refs *refs); - -void mark_reachable(struct object *obj, unsigned int mask); - -struct object_list *object_list_insert(struct object *item, +struct object_list *object_list_insert(struct object *item, struct object_list **list_p); void object_list_append(struct object *item, @@ -78,5 +70,6 @@ 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); #endif /* OBJECT_H */