From: René Scharfe Date: Fri, 11 Aug 2023 17:59:15 GMT Subject: Re: [PATCH] describe: fix --no-exact-match Message-ID: <6a6c86cd-9545-f0b3-8a0f-71d29c0b8833@web.de> In-Reply-To: <20230811151323.GF2303200@coredump.intra.peff.net> Am 11.08.23 um 17:13 schrieb Jeff King: > On Thu, Aug 10, 2023 at 09:10:33PM +0200, René Scharfe wrote: > >> +#define DEFINE_PARSE_OPT_CB(name) \ >> +static inline int name ## __void(const struct option *opt, \ >> + const char *arg, int unset) \ >> +{ \ >> + return name(opt, arg, unset, opt->value); \ >> +} \ >> +struct option > > BTW, I wondered what this extra "struct option" was doing. I guess it is > there to soak up the semi-colon of: > > DEFINE_PARSE_OPT_CB(foo); > > with a noop declaration. Both clever and gross. :) You guessed correctly. It was short and handy.. A production-grade patch would use the function header. René