[PATCH 3/3] commit-slab: introduce a macro to define a slab for new type

2013-04-14 Thread Junio C Hamano
Introduce a header file to define a macro that can define the struct type, initializer, accessor and cleanup functions to manage a commit slab. Update the indegree topological sort facility using it. To associate 32 flag bits with each commit, you can write: define_commit_slab(flag32,

Re: [PATCH 3/3] commit-slab: introduce a macro to define a slab for new type

2013-04-14 Thread Jeff King
On Sat, Apr 13, 2013 at 11:04:49PM -0700, Junio C Hamano wrote: Suppose you want to give one bit per existing ref and paint commits down to find which refs are descendants of each commit. You find that you have 320 refs only at runtime. The code can declare a commit slab struct flagbits

Re: [PATCH 3/3] commit-slab: introduce a macro to define a slab for new type

2013-04-14 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Sat, Apr 13, 2013 at 11:04:49PM -0700, Junio C Hamano wrote: Suppose you want to give one bit per existing ref and paint commits down to find which refs are descendants of each commit. You find that you have 320 refs only at runtime. The code can declare