g_return

Derek Atkins warlord at MIT.EDU
Thu Aug 12 19:17:49 EDT 2004


Very odd...  I don't see why this should be required.  We never
set G_LOG_DOMAIN anywhere in our code, and it's always worked just
fine.  Is something, somehow, setting G_DISABLE_CHECKS?

-derek

Neil Williams <linux at codehelp.co.uk> writes:

> On Thursday 12 August 2004 12:03, Neil Williams wrote:
>> On Wednesday 11 August 2004 10:33, Derek Atkins wrote:
>> > Neil Williams <linux at codehelp.co.uk> writes:
>> > > I even tried g_return_if_fail(1 == 2);
>> >
>> > This should definitely trigger...
>
> This is what I needed to solve the problem:
> in my .c file (not the .h)
>
> #ifdef G_LOG_DOMAIN
> #undef G_LOG_DOMAIN
> #define G_LOG_DOMAIN "qof-book-merge"
> #endif
>
> When, in a separate test program that links qof_book_merge, I deliberately 
> pass a NULL instead of one of the QofBook pointers, like this:
>
> result = qof_book_mergeInit(NULL, mainbook);
>
> I now get:
>
> qof-book-merge-CRITICAL **: file ../qof_book_merge.c: line 49 
> (qof_book_mergeInit): assertion `(importBook != NULL)&&(targetBook != NULL)' 
> failed.
>
> The program aborts cleanly.
>
> As this is a conditional define and it's only in the qof-book-merge code, 
> would this be a problem to keep in the .c file?
>
> -- 
>
> Neil Williams
> =============
> http://www.codehelp.co.uk/
> http://www.dclug.org.uk/
> http://www.isbn.org.uk/
> http://sourceforge.net/projects/isbnsearch/
>
> http://www.biglumber.com/x/web?qs=0x8801094A28BCB3E3
> _______________________________________________
> gnucash-devel mailing list
> gnucash-devel at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available


More information about the gnucash-devel mailing list