Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2004:
[Freeciv-Dev] Re: (PR#8239) Speclist generator
Home

[Freeciv-Dev] Re: (PR#8239) Speclist generator

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] Re: (PR#8239) Speclist generator
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Tue, 23 Mar 2004 03:55:51 -0800
Reply-to: rt@xxxxxxxxxxx

<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??

> 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, this problem does not arise in freeciv (yet).

> That we should ban macros and inline functions from the header files.

Then where do we put them?

> > So the authors of the current speclists made a clever hack using cpp
> > that generates separate .c code for each list (our first code
> > generator).
>
> 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.

> > 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.

I cannot give you a full account until I get back to my dev box.

> I just want to calm Jason. So that he doesn't think we can a big
> number of python code or generators in the next months.

Oh, right. :)

  - Per




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