Complete.Org: Mailing Lists: Archives: freeciv-ai: December 2004:
[freeciv-ai] (PR#9610) autosettler "territory" and danger maps
Home

[freeciv-ai] (PR#9610) autosettler "territory" and danger maps

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [freeciv-ai] (PR#9610) autosettler "territory" and danger maps
From: "Benoit Hudson" <bh@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 19 Dec 2004 10:42:12 -0800
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=9610 >

> [jdorje - Sun Dec 19 18:22:07 2004]:
> You can't cast an int as a void* and treat it as a pointer.  This
> won't work on 64-bit systems

Widening isn't a problem (32-bit int to 64-bit pointer).  On all 64-bit systems 
I've heard of, 
int is no larger than void*.

Otherwise, we might want to have a "templated" list that can store 
arbitrary-sized structs, 
possibly using a genlist underneath and doing its own allocation.

And last thing: I haven't looked at the code closely, but it's possible that a 
specvec may work 
fine here; specvecs do their own allocation and thus obviate this problem.



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