Re: [PATCH] strbuf: use designated initializers in STRBUF_INIT
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- Jul 10, 2017, 19:57 UTC
- Message-ID
- <c349f324-8f6d-2fe0-8982-2e37869d37b5@kdbg.org>
- In-Reply-To
- <20170710070342.txmlwwq6gvjkwtw7@sigill.intra.peff.net>
Am 10.07.2017 um 09:03 schrieb Jeff King:
Show 7 quoted lines
> On Sun, Jul 09, 2017 at 10:05:49AM -0700, Junio C Hamano wrote: > >> René Scharfe <l.s.r@web.de> writes: >> >>> I wonder when we can begin to target C99 in git's source, though. :) >> >> Let's get the ball rolling...
Good to know that you do not resist moving to a more modern build environment.
>> by starting to use some of the useful >> features like designated initializers,
It's a pity, though, that you do not suggest something even more useful, such as C++14.
> Subject: [PATCH] strbuf: use designated initializers in STRBUF_INIT
> -#define STRBUF_INIT { 0, 0, strbuf_slopbuf }
> +#define STRBUF_INIT { .alloc = 0, .len = 0, .buf = strbuf_slopbuf }While this may serve as a test balloon, changing STRBUF_INIT, or any of those _INIT macros, is actually the least interesting. The interesting instances are initializations for which we do *not* have a macro.
-- Hannes