summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d489bc1)
raw | patch | inline | side by side (parent: d489bc1)
author | Shawn O. Pearce <spearce@spearce.org> | |
Mon, 15 Jan 2007 05:16:23 +0000 (00:16 -0500) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Mon, 15 Jan 2007 05:16:23 +0000 (00:16 -0500) |
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
fast-import.c | patch | blob | history |
diff --git a/fast-import.c b/fast-import.c
index f0f51a68998222d48b4c3f8e2c5727f0842690f4..3a98cb848f0a647a536c06c38915b3cd0259e80e 100644 (file)
--- a/fast-import.c
+++ b/fast-import.c
struct object_entry
{
struct object_entry *next;
- enum object_type type;
unsigned long offset;
+ unsigned type : TYPE_BITS;
unsigned char sha1[20];
};
static unsigned long object_count;
static unsigned long duplicate_count;
static unsigned long marks_set_count;
-static unsigned long object_count_by_type[9];
-static unsigned long duplicate_count_by_type[9];
-static unsigned long delta_count_by_type[9];
+static unsigned long object_count_by_type[1 << TYPE_BITS];
+static unsigned long duplicate_count_by_type[1 << TYPE_BITS];
+static unsigned long delta_count_by_type[1 << TYPE_BITS];
/* Memory pools */
static size_t mem_pool_alloc = 2*1024*1024 - sizeof(struct mem_pool);
static FILE* branch_log;
-static void alloc_objects(int cnt)
+static void alloc_objects(unsigned int cnt)
{
struct object_entry_pool *b;