]> git.ipfire.org Git - thirdparty/git.git/blobdiff - object.c
Abstract out accesses to object hash array
[thirdparty/git.git] / object.c
index 37784cee9a90a7e5b44dd660d6b7ea9191b59486..31c77ea03a2083ce9ed7c71a2b4d90fb6b944c78 100644 (file)
--- a/object.c
+++ b/object.c
@@ -5,9 +5,18 @@
 #include "commit.h"
 #include "tag.h"
 
-struct object **objs;
-static int nr_objs;
-int obj_allocs;
+static struct object **objs;
+static int nr_objs, obj_allocs;
+
+unsigned int get_max_object_index(void)
+{
+       return obj_allocs;
+}
+
+struct object *get_indexed_object(unsigned int idx)
+{
+       return objs[idx];
+}
 
 const char *type_names[] = {
        "none", "blob", "tree", "commit", "bad"