From: Johannes Schindelin Date: Mon, 28 Jul 2008 09:58:52 GMT Subject: Re: [PATCH 3/6] builtin-help: make it possible to exclude some commands in list_commands() Message-ID: In-Reply-To: <7vljzmwvww.fsf@gitster.siamese.dyndns.org> Hi, On Sun, 27 Jul 2008, Junio C Hamano wrote: > Johannes Schindelin writes: > > >> > +struct cmdnames { > >> > + int alloc; > >> > + int cnt; > >> > + struct cmdname { > >> > + size_t len; > >> > + char name[1]; > >> > + } **names; > >> > +}; > >> > >> I thought we do this kind of thing using FLEX_ARRAY macro. Is there any > >> reason its use is not appropriate here? > > > > I think that came up in the previous review round: the "name" member _is_ > > NUL-terminated, but could have a ".exe" suffix. The "len" member has the > > length excluding ".exe". > > Sorry, but I do understand what you are trying to explain. > > Marking the flexible member at the end as "last_member[FLEX_ARRAY]" is > about a tiny bit of abstracting out how the exact decl syntax should look > like depending on the compiler. Ah, sorry, I misunderstood. I thought your complaint was about something else. Ciao, Dscho