Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2004:
[Freeciv-Dev] Re: (PR#11213) Making client headers compatible with C++
Home

[Freeciv-Dev] Re: (PR#11213) Making client headers compatible with C++

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] Re: (PR#11213) Making client headers compatible with C++
From: "Frédéric Brière" <fbriere@xxxxxxxxxxx>
Date: Mon, 29 Nov 2004 19:40:50 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=11213 >

On Mon, Nov 29, 2004 at 07:06:31PM -0800, Jason Short wrote:
> I really don't like the idea of changing perfectly good C code to match
> with C++.  This was done in the past for a C++ BeOS client and nothing

Believe me, I have no desire to mess up your work. :)

> ever came of it except broken code.  Renaming elements to avoid keywords
> is okay, but adding casts to void pointers is just ugly.  Can't you use

I did nothing of the sort.  If you look at the patch, you'll see that I
cast a void pointer *to* a SPECLIST_TYPE (or SPECVEC_TYPE) pointer,
which is the return type of the function.  There was already an implicit
cast going on, and I merely made it explicit.  (C++ doesn't allow
implicit conversion from void pointers, to prevent bad surprises.)

> C bindings for Qt?  Or is it possible some of these errors are just
> warnings, and can be ignored?

Given how much time I spent Googling to make sure I knew which part of
the standard was involved for each item, I'm pretty confident.  (The
story behind disallowing forward declaration of enums is quite
interesting, BTW.)  I didn't want to bother you with too many details,
but if you'd like a more thorough explanation of some or all of the
problems I raised, I'd be glad to oblige you.


-- 
             Frédéric Brière    <*>    fbriere@xxxxxxxxxxx

 =>  <fbriere@xxxxxxxxxx> IS NO MORE:  <http://www.abacomsucks.com>  <=





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