Add a generic "object decorator" interface, and make object refs use it

This allows you to add an arbitrary "decoration" of your choice to any
object.  It's a space- and time-efficient way to add information to
arbitrary objects, especially if most objects probably do not have the
decoration.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Linus Torvalds
2007-04-16 16:03:15 -07:00
committed by Junio C Hamano
parent 402fa75eed
commit a59b276e18
5 changed files with 116 additions and 65 deletions

View File

@ -8,7 +8,6 @@ struct object_list {
struct object_refs {
unsigned count;
struct object *base;
struct object *ref[FLEX_ARRAY]; /* more */
};