From: Alex Riesen <raa.lkml@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Thiago Farina <tfransosi@gmail.com>,
git@vger.kernel.org, jrnieder@gmail.com, srabbelier@gmail.com
Subject: Re: [PATCH] string-list.h: Add STRING_LIST_INIT macro and make use of it.
Date: Mon, 28 Jun 2010 10:29:49 +0200 [thread overview]
Message-ID: <AANLkTim14fh1RRSoYFK5uIqi8OrkB2zHahInDpO80gws@mail.gmail.com> (raw)
In-Reply-To: <7vbpawifwa.fsf@alter.siamese.dyndns.org>
On Sun, Jun 27, 2010 at 18:44, Junio C Hamano <gitster@pobox.com> wrote:
> I think you need the attached on top to be more complete.
>
> But I wonder if this is worth it (not this "more complete", but your
> patch). We convert 16 or so instances of initialization for "no strdup"
> list, but there are about the same number of "strdup" instances still
> spelled out:
>
> $ git grep -e 'struct string_list [^ ]* = {.*'
> $ git grep -e 'struct string_list [^ ]* = {.*1'
>
> Wouldn't it be more sensible to use this instead?
>
> #define STRING_LIST_INIT(pleasedup) { NULL, 0, 0, (pleasedup) }
>
This begs for using strdup(string-to-dup) in the macro argument, which
will not compile with ancient compilers which don't allow code in an
initializer.
next prev parent reply other threads:[~2010-06-28 8:29 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-26 22:34 [PATCH] string-list.h: Add STRING_LIST_INIT macro and make use of it Thiago Farina
2010-06-26 22:53 ` Sverre Rabbelier
2010-06-26 23:04 ` Jonathan Nieder
2010-06-26 23:44 ` Thiago Farina
2010-06-26 23:40 ` Thiago Farina
2010-06-26 23:47 ` Thiago Farina
2010-06-27 16:44 ` Junio C Hamano
2010-06-28 8:29 ` Alex Riesen [this message]
2010-06-29 5:43 ` Junio C Hamano
2010-06-29 8:15 ` Peter Kjellerstedt
2010-06-29 8:33 ` Alex Riesen
2010-07-02 19:15 ` [PATCH] string_list: " Thiago Farina
2010-07-02 19:30 ` Jonathan Nieder
2010-07-02 19:47 ` Thiago Farina
2010-07-02 20:22 ` Jonathan Nieder
2010-07-04 19:46 ` Thiago Farina
2010-07-07 15:19 ` Jonathan Nieder
2010-07-07 16:55 ` Junio C Hamano
2010-07-10 5:01 ` Thiago Farina
2010-07-10 22:41 ` Jonathan Nieder
2010-08-19 13:28 ` Thiago Farina
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AANLkTim14fh1RRSoYFK5uIqi8OrkB2zHahInDpO80gws@mail.gmail.com \
--to=raa.lkml@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@gmail.com \
--cc=srabbelier@gmail.com \
--cc=tfransosi@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).