Re: [AD] Addon public API function declarations

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Sun, 2009-01-04 at 11:22 +0100, Milan Mimica wrote:
> Elias Pschernig wrote:
> > 
> > I was wondering about those macro definitions as well, my understanding
> > is they are needed for the Windows DLL versions. I'd be all for only
> > having one set of macros and re-using them in all addons though, the
> > current way likely makes it impossible writing external addons.
> 
> I just thought of another reason for per-addon macros: Some addons link to 
> another addons. So in the same compiling unit, functions of one addon have to be 
> declared as externs while functions of the other addon have to be declared as 
> exports.
> I don't see any possible problems for external addons.
> 

Well, look for example at a5_font.h. What is the reason to have the
author of the addon #define their own _ALLEGRO_FONT_DLL instead of just
using a macro like _ALLEGRO_ADDON_DLL which can be shared by all addons?
The entire first half of that header could then be removed, making it a
lot more readable.

-- 
Elias Pschernig <elias@xxxxxxxxxx>





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/