Re: [AD] Some little things

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


On Sat, May 19, 2001 at 12:03:48PM +0200, Eric Botcazou wrote:
> - several API calls are macros: allegro_init(), uconvert_ascii(),
> uconvert_toascii(), ustrdup(), quad_interpolate(). I think it should be safe
> to make them inline functions instead,

`allegro_init' and `ustrdup' must remain macros -- it's
important that they are expanded from the user's code, because
they need to grab the addresses of libc symbols (malloc, atexit,
etc).  If they're inline then this would still be OK in release
builds but in debug builds inlining may be disabled (it totally
depends on the user's compiler settings) and then extern
versions of these routines would be used, compiled along with
Allegro itself, which would cause the routines to get the
addresses of the wrong DLL's symbols in Windows.

George

-- 
Random project update:
09/05/2000: Libnet 0.10.8 uploaded -- a few bugfixes
        http://www.canvaslink.com/libnet/  (try changes-0.10.8.txt)



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