Thread (11 messages) 11 messages, 3 authors, 2023-08-12

Re: [PATCH] describe: fix --no-exact-match

From: Jeff King <hidden>
Date: 2023-08-11 15:13:26

Possibly related (same subject, not in this thread)

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. :)

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help