[Freeciv-Dev] Re: (PR#8239) Speclist generator
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=8239 >
On Tue, Mar 23, 2004 at 03:55:51AM -0800, Per I. Mathisen wrote:
>
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=8239 >
>
> On Tue, 23 Mar 2004, Raimar Falke wrote:
> > You know that with your approach the localization of the types and
> > functions go away. Currently you can assume that if there is no
> > foolist.h file that this list type is declared in foo.h.
>
> I don't understand. We don't localize (translate) types or functions??
Wrong word. I mean that all functions and types for a certain
object/class (like city) are all in the same file.
> > Can you cite a file which has 5+ list declaration in a single file?
>
> Yes, I can. Want me to paste it? It isn't a freeciv file.
> As I explained in the first post,
Ohh I overread that.
> this problem does not arise in freeciv (yet).
There is the question if this case will eventually happen in
freeciv. So far I doubt this.
> > That we should ban macros and inline functions from the header files.
>
> Then where do we put them?
Make all normal functions and put them in the .c file. And yes I
exclude things like iterate here which have to be macros.
> > Yes the cpp is used as a generator. It is the good natural choice
> > since it is portable, available and requires no extra time. You
> > yourself wanted to implement the packet generator with cpp.
>
> Yes. And as you know, I failed.
>
> Now we require python anyway, so we can just as well slide down the
> slippery... Err, no, I didn't say that.
The point remains that a python generator should IMHO provide some
advantage over a cpp solution.
> > > However, this clever hack does not work with macro or inline
> > > functions.
> >
> > Can you explain this in more detail?
>
> It is a bit complicated. The core problem is that you can neither
> conditionally define a macro nor expand macros in a macro name.
Both are possible. See CHECK_MAP_POS and SPECLIST_PASTE. The latter
isn't beautiful but possible.
> I cannot give you a full account until I get back to my dev box.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"brand memory are for windows users that think their stability
problems come from the memory"
-- bomek in #freeciv
- [Freeciv-Dev] Re: (PR#8239) Speclist generator, Jason Short, 2004/03/22
- [Freeciv-Dev] Re: (PR#8239) Speclist generator, Raimar Falke, 2004/03/23
- [Freeciv-Dev] Re: (PR#8239) Speclist generator, Per I. Mathisen, 2004/03/23
- [Freeciv-Dev] Re: (PR#8239) Speclist generator, Raimar Falke, 2004/03/23
- [Freeciv-Dev] Re: (PR#8239) Speclist generator, Per I. Mathisen, 2004/03/23
- [Freeciv-Dev] Re: (PR#8239) Speclist generator,
Raimar Falke <=
- [Freeciv-Dev] Re: (PR#8239) Speclist generator, Per I. Mathisen, 2004/03/23
- [Freeciv-Dev] Re: (PR#8239) Speclist generator, Raimar Falke, 2004/03/23
- [Freeciv-Dev] Re: (PR#8239) Speclist generator, Jason Short, 2004/03/23
- [Freeciv-Dev] Re: (PR#8239) Speclist generator, Raimar Falke, 2004/03/23
- [Freeciv-Dev] Re: (PR#8239) Speclist generator, rwetmore@xxxxxxxxxxxx, 2004/03/25
|
|