Re: [AD] namespace collision

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


> If we go for prefixing, we could use inline functions for the
> old names, and require the user to use the new names if they
> need to do anything dodgy like take the address of a function.
> Can you see any problems with this?  The inline versions would
> only exist in allegro.h, optionally excluded by setting a
> define.  The huge advantage of inline functions is that the
> compiler understands context, so we won't damage class methods.

inline functions? i like that idea
it is has a lot of less troubles than with #define
and that way we get out of trouble with redefined macros

and also then using typedefs for structs
typedef BITMAP ALLEGRO_BITMAP;

really nice =)

then for prefixed functions we could make a header named
allegro4.h

and then allegro.h would have
#include <allegro4.h>
// all inline and typedefs here

that way we also need only one library and one import library and no broken
old compatibility, etc



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