@matheusbsbs / matheus-bagliano / commits / 03842d8e24
Fork 0

Misc. type cleanups within fast-import.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Shawn O. Pearce committed Jan 15, 2007 at 00:16 UTC 03842d8e24face522fa0ca846283da33e747e4f0
1 file changed +5 -5
fast-import.c
+5 -5
@@ -110,8 +110,8 @@ Format of STDIN stream:
110 struct object_entry
111 {
112 struct object_entry *next;
113 - enum object_type type;
113 unsigned long offset;
114 + unsigned type : TYPE_BITS;
115 unsigned char sha1[20];
116 };
117
@@ -220,9 +220,9 @@ static unsigned long remap_count;
220 static unsigned long object_count;
221 static unsigned long duplicate_count;
222 static unsigned long marks_set_count;
223 -static unsigned long object_count_by_type[9];
224 -static unsigned long duplicate_count_by_type[9];
225 -static unsigned long delta_count_by_type[9];
223 +static unsigned long object_count_by_type[1 << TYPE_BITS];
224 +static unsigned long duplicate_count_by_type[1 << TYPE_BITS];
225 +static unsigned long delta_count_by_type[1 << TYPE_BITS];
226
227 /* Memory pools */
228 static size_t mem_pool_alloc = 2*1024*1024 - sizeof(struct mem_pool);
@@ -276,7 +276,7 @@ static struct dbuf new_data;
276 static FILE* branch_log;
277
278
279 -static void alloc_objects(int cnt)
279 +static void alloc_objects(unsigned int cnt)
280 {
281 struct object_entry_pool *b;
282