Re: Request for hard code freeze break



On 3/12/07, Frederic Crozat <fcrozat mandriva com> wrote:
I'm really not sure adding a g_assert is a good way to implement test in
code : it will just crash the problem.

g_return_if_fail would be better.

The check for the NULL pointer went into the calling function.  The
assert was placed in the import function because that function assumes
that text is non-NULL.  The assert will be compiled out in production
code but will inform the developer making an incorrect call that they
have violated the stated assumption.

Cheers,

Adam



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