Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2001:
[Freeciv-Dev] Re: Fwd: Re: Re: Request (PR#939)
Home

[Freeciv-Dev] Re: Fwd: Re: Re: Request (PR#939)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Trent Piepho <xyzzy@xxxxxxxxxxxxx>
Cc: Paul Zastoupil <paulz@xxxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Fwd: Re: Re: Request (PR#939)
From: Gaute B Strokkenes <gs234@xxxxxxxxx>
Date: Fri, 07 Sep 2001 01:31:36 +0200

On Thu, 6 Sep 2001, xyzzy@xxxxxxxxxxxxx wrote:
> On Thu, 6 Sep 2001, Paul Zastoupil wrote:
>> 
>> How about this?
> 
> That looks pretty nice.  Certainly a lot cleaner than those sizeof's
> everywhere.
> 
> Only problem I see is that if someone decides to change an array
> from a static one to a dynamically allocated one, the ARRAY_SIZE
> macro will still work, but will have a completely wrong value.

Yes, but then again the current code would break just as badly, in
precisely the same fashion.  Besides, you would probably notice.

> Of course one would hope that someone doing this would find and fix
> code that thought it knew the length of the array.

Indeed.

-- 
Big Gaute                               http://www.srcf.ucam.org/~gs234/
It's 74 degrees, 12 minutes NORTH, and 41 degrees, 3 minutes EAST!!
 Soon, it will be TUESDAY!!


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