Re: [AD] MIN, MAX,... violate namespace

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


On 2009-02-15, Elias Pschernig <elias.pschernig@xxxxxxxxxx> wrote:
> Is it ok if I rename them to _ALLEGRO_MIN, _ALLEGRO_MAX and so on and
> move from base.h to aintern.h? I don't think we need to keep them in the
> public API, it's not our job to provide missing C operators :P

Fine by me.

> 
> I also wouldn't really care at this point, but I'm trying to use A5 and
> glib together and it doesn't quite work out:
> 
> http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html
> 
> With A4 I'd have my way by hacking around a bit with #define.. but in A5
> the goal is to have a 100% clean namespace anyway, so I guess it's a
> good excuse to fix it properly right away.
> 
> If it seems to make the code unreadable, I could put lines like this on
> top of .c files with extensive use, instead of renaming:
> 
> #define MAX _ALLEGRO_MAX

Yes, that's the way to go.

Peter





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