freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] FreeType compatibility with C++ managed extensions


From: David Turner
Subject: Re: [ft-devel] FreeType compatibility with C++ managed extensions
Date: Mon, 17 Oct 2005 23:26:26 +0200
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)

Hi Graham,

an identifier like "generic" is part of the public API and is already used
by third-party libraries (e.g. Pango). There is thus a _very_ slim chance
that we're going to change it. On the other hand, "internal" is not supposed
to be used by clients, so it could be changed.

There might a solution by using some ugly processors tricks, with a small
price to pay for managed-C++ users which should use one or two distinct
identifiers (e.g. "generik" instead of "generic")

Do you have a complete list of problematic keywords ?

Regards,

- David Turner
- The FreeType Project  (www.freetype.org)


Graham Asher a écrit :

Dear FreeTypers,

I had some second thoughts about making FreeType run under C++ managed
extensions.

You have to compile everything as C++, not C. That causes compatibility
problems. To quote Microsoft
(http://msdn2.microsoft.com/en-us/library/ms173265): "The C++ type-safety
rules are strict, so type conversions must be made explicit with casts. For
example, malloc returns a void pointer, but can be assigned to a pointer to
any type in C with a cast:" ... and "Identifiers used in C code that happen
to be keywords in C++ (such as virtual, new, delete, bool, true, false,
etc.) must be renamed. This can generally be done with simple
search-and-replace operations.".

This alone makes my original idea impractical :-(

So my original impression that all I had to do was change identifiers in
header files #included by C++ was incorrect.

Therefore I withdraw my proposal. (It may still be possible to use FreeType
in what Microsoft call a 'mixed assembly' - part managed C++ and part
unmanaged C/C++ - the unmanaged part would be FreeType - but the header
files would still cause a problem to any managed code that needed to call
FreeType functions.)

Best regards,

Graham Asher




_______________________________________________
Freetype-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/freetype-devel





reply via email to

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