Re: [AD] al_assert

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


On 2009-04-16, Peter Hull <peterhull90@xxxxxxxxxx> wrote:
> Hmm. I'm not sure what it should actually do - isn't it platform
> dependent? On OSX there's an equivalent function NSAssert which raises
> an exception if it's triggered, but what is the equivalent on other
> platforms?

abort()?

Apparently you should be using NSCAssert inside C functions.  However, I
see that it's an equivalent of the assert() macro so it takes a condition
argument, but by the time we're in al_assert() we know the condition has
failed.

> Pete
> 
> On Thu, Apr 16, 2009 at 12:04 AM, Peter Wang <novalazy@xxxxxxxxxx> wrote:
> > On 2009-04-15, Peter Hull <peterhull90@xxxxxxxxxx> wrote:
> >> I added a patch to the tracker, it adds a new AL_FUNC_NORETURN macro
> >> (in case there are any other functions we want to mark) I haven't
> >> tested with MSVC. Unfortunately it now complains that al_assert can
> >> return (which it can) - could we clear that up too?
> >
> > Yes, get rid of the register_assert_handler() stuff.
> >
> > Not sure about register_trace_handler.
> >
> > Peter





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