Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2001:
[Freeciv-Dev] Re: [FreeCiv-Cvs] rfalke: Cleanup: replace "sizeof(x)/size
Home

[Freeciv-Dev] Re: [FreeCiv-Cvs] rfalke: Cleanup: replace "sizeof(x)/size

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Gaute B Strokkenes <gs234@xxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [FreeCiv-Cvs] rfalke: Cleanup: replace "sizeof(x)/sizeof(x[0])" wi...
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 7 Sep 2001 09:46:37 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Fri, Sep 07, 2001 at 12:37:50AM +0200, Gaute B Strokkenes wrote:
> On Thu, 6 Sep 2001, freeciv@xxxxxxxxxxxxxxxxxxx wrote:
> > This is an automated notification of a change to freeciv cvs, 
> > on Thu Sep  6 14:23:05 PDT 2001 = Thu Sep  6 21:23:05 2001 (GMT)
> > by Raimar Falke <rf13@xxxxxxxxxxxxxxxxxxxxxx>
> > 
> > ---- Files affected:
> > 
> > freeciv/client options.c freeciv/client/gui-gtk menu.c repodlgs.c
> > freeciv/client/gui-win32 menu.c repodlgs.c freeciv/common
> > government.c hash.c improvement.c map.c shared.c shared.h tech.c
> > unittype.c freeciv/server report.c rulesout.c stdinhand.c
> > unittools.c
> > 
> > ---- Log message:
> > 
> > Cleanup: replace "sizeof(x)/sizeof(x[0])" with a new macro
> > ARRAY_SIZE.
> > 
> > Patch by Paul Zastoupil <paulz@xxxxxxxxxxxx> with minor changes by
> > me.
> 
> This is a very good idea, but I think the name should be ARRAY_LEN to
> since the value returned is the number of elements, rather than
> something you can pass to malloc().

This is exactly what I feared: a long discussion about the name of the
thing. Experience told us that the discussion will not come to a
consensus. So I just applied it. If you find the name wrong lets
discuss this in a long thread and IF there is a consensus you have
just to s/ARRAY_SIZE/ARRAY_LEN/.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 Q:  Do you know what the death rate around here is?
 A:  One per person.


[Prev in Thread] Current Thread [Next in Thread]