Re: [RFC/PATCH 0/5] macro-based key/value maps
From: Jeff King <hidden>
Date: 2016-06-15 22:51:45
On Thu, Aug 04, 2011 at 04:43:54PM -0600, Jeff King wrote:
Well, if you like that, then here is the end-result of what the persistent version would look like. It's quite convenient to use, but an awful pain to debug. It's done entirely in the preprocessor; I suspect if I wrote the code generation externally, that would be easier and more readable (and there are one or two places where we could be slightly more efficient, that are just difficult to implement via the preprocessor). [1/5]: implement generic key/value map [2/5]: fast-export: use object to uint32 map instead of "decorate" [3/5]: decorate: use "map" for the underlying implementation [4/5]: map: implement persistent maps [5/5]: implement metadata cache subsystem
Side note: Commits 1, 4, and 5 introduce infrastructure in the form of static functions and macros that contain functions that call the statics. But they don't actually instantiate the macro functions themselves, so they won't compile with -Werror (due to the "unused static" warning) until there is some calling code. That hurts bisectability a little if you compile with -Werror (you need to add -Wno-error=unused-function). I don't know how much we care. -Peff