Re: [PATCH 1/2] Add strbuf_initf()
- From
Jeff King <peff@peff.net>
- Date
- Mar 6, 2008, 12:09 UTC
- Message-ID
- <20080306120909.GA7518@sigill.intra.peff.net>
- In-Reply-To
- <alpine.LSU.1.00.0803061148180.15786@racer.site>
On Thu, Mar 06, 2008 at 11:53:28AM +0100, Johannes Schindelin wrote:
Show 6 quoted lines
> AFAIR it is unportable to have a macro > > #define strbuf_initf(buf, fmt, ...) \ > (strbuf_init(buf, strlen(fmt) + 64), strbuf_addf(buf, fmt, args);) > > (GNU cpp groks it, but what about the others?)
C99 has variable-argument macros, but C89 does not. I have no idea in practice how many of the compilers git targets support them (in one form or another).
-Peff