On Thu, Dec 01, 2016 at 12:22:37PM -0800, Junio C Hamano wrote:
> Junio C Hamano <gits...@pobox.com> writes:
> > Eh, wait. BSD and Microsoft have paramters reordered in the
> > callback comparison function. I suspect that would not fly very
> > well.
> Hmm. We could do it like this, which may not be too bad.
Heh. Exactly, but I was too lazy to write it out in my other email. :)
The no-cost version would be more like:
#define DECLARE_CMP(func) int func(void *data, const void *va, const void *vb)
#define DECLARE_CMP(func) int func(const void *va, const void *vb, void *data)
const struct foo *a = va, *b = vb;
... etc ...