Re: [AD] TRACEs in xkeyboard.c

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


On Saturday 24 September 2005 06:24 pm, Peter Wang wrote:
> On 2005-09-24, Elias Pschernig <elias@xxxxxxxxxx> wrote:
> > diff -u -p -r1.3 debug.h
> > --- include/allegro/debug.h	7 Mar 2005 22:55:21 -0000	1.3
> > +++ include/allegro/debug.h	24 Sep 2005 11:09:59 -0000
> > @@ -34,7 +34,8 @@ AL_FUNC(void, register_trace_handler, (A
> >
> >  #ifdef DEBUGMODE
> >     #define ASSERT(condition)     { if (!(condition)) al_assert(__FILE__,
> > __LINE__); } -   #define TRACE                 al_trace
> > +   #define                       TRACE_PREFIX
> > +   #define TRACE                 TRACE_PREFIX al_trace
>
> Umm, what is that?

Yeah, I mentioned in IRC to him that that could break programs. An alternative 
would be:

static INLINE void _al_int_dummy()
{
}
#ifdef DEBUGMODE
#define TRACE  ((0) ? _al_int_dummy : (al_trace("Allegro:: "),al_trace))
#else
#define TRACE  ((1) ? _al_int_dummy : al_trace)




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