Re: g_return_if_fail() breakage



Am Die, 2002-11-26 um 18.41 schrieb rsteinke w-link net:
> >
> > Right, it'd work fine for g_return_if_fail().  But G_[UN]LIKELY() are
> > public API and I'm sure most people won't expect breakage if they write
> >
> >     if(!G_LIKELY(foo || bar)) ...
> >
> > If the parens are going to be removed this should be documented.  With a
> > big red warning sign.
> 
> Perhaps _G_LIKELY_PRIVATE() without parens, and use it to implement both
> g_return_if_fail() and G_LIKELY()?

I didn't dare suggesting that because it would make the code even more
complex than it already is :-)

I won't mind though.

--Daniel





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]