Re: namespace collision (was: multithreaded callbacks (was Re: [AD] de fourium pointium ohium)) |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
In reply to Bob <ohannessian@xxxxxxxxxx>: >Perhaps this could be done for the whole API. There would be a a #define >(#define ALLEGRO_API ?) that would prefix all the Allegro functions and >variables with allegro_. >A note could then be placed in the FAQ about what to do in case there is a >namespace collision. I wholeheartedly agree :-) Allegro's namespace pollution is not something I like. I would recommend prefixing everything with `al_' (or `_al_', `AL_' or `_AL', depending on context). We could change the definitions of AL_METHOD, AL_VAR, etc. if ALLEGRO_NAMESPACE is defined, to automate this. We could also provide an "allegro4.h" header file, which would simply be: #define ALLEGRO_NAMESPACE #include "allegro.h" And then tell everybody to use allegro4.h :-) Bye for now, -- Laurence Withers, lwithers@xxxxxxxxxx http://www.lwithers.demon.co.uk/
Attachment:
signature.asc
Description: PGP signature
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |