[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 06:23:37 -0800 |
Reply-to: |
rt@xxxxxxxxxxx |
<URL: http://rt.freeciv.org/Ticket/Display.html?id=8239 >
On Tue, 23 Mar 2004, Raimar Falke wrote:
> Wrong word. I mean that all functions and types for a certain
> object/class (like city) are all in the same file.
Well. From a programmer's perspective, there is no difference. Both are
included. From the compiler's perspective, I don't see much difference,
either.
(Except perhaps that a generator'ed speclist header file is much easier to
read than speclist.h)
> > > 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.
I must be missing something. Don't inline functions have to be implemented
in a header file if they are to be used in several files?
> > 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.
Ugh. What I meant to write is: can neither define a macro that defines a
macro nor define macros names containing macros.
Now, SPECLIST_PASTE is a really clever hack. However, it has some
limitations. Let me get back to that.
- Per
- [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, 2004/03/23
- [Freeciv-Dev] Re: (PR#8239) Speclist generator,
Per I. Mathisen <=
- [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
|
|