On Thu, Jul 14, 2011 at 20:55, Jeff King <peff@xxxxxxxx> wrote: > On Thu, Jul 14, 2011 at 08:54:07PM +0200, Bert Wesarg wrote: > >> On Thu, Jul 14, 2011 at 20:52, Bert Wesarg <bert.wesarg@xxxxxxxxxxxxxx> wrote: >> > On Thu, Jul 14, 2011 at 19:51, Jeff King <peff@xxxxxxxx> 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. When I wrote such macros in the past, the 'generated' functions where all static. So one could instantiate a map multiple times in different compilation units where one need to access this type of map. But I'm perfectly fine with your way, which is new to me. Bert > > -Peff > -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html