All of lore.kernel.org
 help / color / mirror / Atom feed
From: Francis Galiegue <fg@one2team.net>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH] very small cleanup: #undef a macro that isn't used anywhere else
Date: Mon, 10 Nov 2008 20:09:58 +0100	[thread overview]
Message-ID: <200811102009.58332.fg@one2team.net> (raw)
In-Reply-To: <alpine.DEB.1.00.0811102008330.30769@pacific.mpi-cbg.de>

Le Monday 10 November 2008 20:09:21 Johannes Schindelin, vous avez écrit :
> Hi,
>
> On Mon, 10 Nov 2008, Francis Galiegue wrote:
> > In xdiff-interface.c, the FIRST_FEW_BYTES macro is defined, is never
> > used anwhere else, so we might as well undefine it after we're done with
> > it.
>
> Would not the consequence be that we end up with a ton of #undefines all
> over the place, reducing readability incredibly?
>

Hmwell, this is a twofold argument, I guess...

* for: the macro is defined, not undefined: it means that potentially, it can 
be used somewhere else in the file; but it isn't (in this case);
* against: macros defined in a C file only ever have scope in said file 
(unless so mischievous Makefile cats two C files together before compile and 
file order is important -- but git doesn't do that), so why #undefine 
anything?

Personally, I'm with the first argument. YMMV, of course.

-- 
fge

      reply	other threads:[~2008-11-10 19:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-10 18:28 [PATCH] very small cleanup: #undef a macro that isn't used anywhere else Francis Galiegue
2008-11-10 19:09 ` Johannes Schindelin
2008-11-10 19:09   ` Francis Galiegue [this message]

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200811102009.58332.fg@one2team.net \
    --to=fg@one2team.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    /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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.