From: Jeff King Date: Thu, 14 Jul 2011 18:55:39 GMT Subject: Re: [PATCH 1/3] implement generic key/value map Message-ID: <20110714185539.GA27141@sigill.intra.peff.net> In-Reply-To: On Thu, Jul 14, 2011 at 08:54:07PM +0200, Bert Wesarg wrote: > On Thu, Jul 14, 2011 at 20:52, Bert Wesarg wrote: > > On Thu, Jul 14, 2011 at 19:51, Jeff King wrote: > >> +#define MAP_IMPLEMENT(name, ktype, vtype, cmp_fun, hash_fun) \ > > > > This define should probably in the header too. Else this is completely useless. > > Ahh. One have to read patch 2/3, to see how to use this. Please feel > free to ignore this than. Yeah, you could treat this like a C++ template and assume random bits of code will instantiate a map of whatever types they need. But this is C, and we only want to instantiate once. So I just figured to keep the static list of whatever maps git needs in the map.[ch] files. -Peff