summaryrefslogtreecommitdiff
path: root/object.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@osdl.org>2006-06-29 21:38:55 -0700
committerJunio C Hamano <junkio@cox.net>2006-06-29 23:48:31 -0700
commitfc046a75d539a78e6b2c16534c4078617a69a327 (patch)
tree03842bdfab234301a0a0c693f30c087a58eeb51f /object.h
parent8dbbd14ea3ae1b4e825f1e7d314afddf26c67298 (diff)
downloadgit-fc046a75d539a78e6b2c16534c4078617a69a327.tar.gz
Abstract out accesses to object hash array
There are a few special places where some programs accessed the object hash array directly, which bothered me because I wanted to play with some simple re-organizations. So this patch makes the object hash array data structures all entirely local to object.c, and the few users who wanted to look at it now get to use a function to query how many object index entries there can be, and to actually access the array. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'object.h')
-rw-r--r--object.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/object.h b/object.h
index 6f23a9a180..e0125e154f 100644
--- a/object.h
+++ b/object.h
@@ -40,10 +40,11 @@ struct object {
};
extern int track_object_refs;
-extern int obj_allocs;
-extern struct object **objs;
extern const char *type_names[];
+extern unsigned int get_max_object_index(void);
+extern struct object *get_indexed_object(unsigned int);
+
static inline const char *typename(unsigned int type)
{
return type_names[type > TYPE_TAG ? TYPE_BAD : type];