This can't work..   A GncOwner isn't a QofInstance.

-derek

Quoting David Hampton <[EMAIL PROTECTED]>:

> Author: hampton
> Date: 2007-04-07 14:24:53 -0400 (Sat, 07 Apr 2007)
> New Revision: 15849
> Trac: http://svn.gnucash.org/trac/changeset/15849
>
> Modified:
>   gnucash/trunk/src/business/business-core/gncInvoice.c
> Log:
> Fix compiler complaints about dereferencing type-punned pointers.
>
>
> Modified: gnucash/trunk/src/business/business-core/gncInvoice.c
> ===================================================================
> --- gnucash/trunk/src/business/business-core/gncInvoice.c     2007-04-07 
> 16:12:31 UTC (rev 15848)
> +++ gnucash/trunk/src/business/business-core/gncInvoice.c     2007-04-07 
> 18:24:53 UTC (rev 15849)
> @@ -484,15 +484,21 @@
> static QofInstance*
> qofInvoiceGetOwner (GncInvoice *invoice)
> {
> +     GncOwner *owner;
> +
>       if(!invoice) { return NULL; }
> -     return QOF_INSTANCE(&invoice->owner);
> +     owner = &invoice->owner;
> +     return QOF_INSTANCE(owner);
> }
>
> static QofInstance*
> qofInvoiceGetBillTo (GncInvoice *invoice)
> {
> +     GncOwner *billto;
> +
>       if(!invoice) { return NULL; }
> -     return QOF_INSTANCE(&invoice->billto);
> +     billto = &invoice->billto;
> +     return QOF_INSTANCE(billto);
> }
>
> Timespec gncInvoiceGetDateOpened (GncInvoice *invoice)
>
> _______________________________________________
> gnucash-changes mailing list
> [EMAIL PROTECTED]
> https://lists.gnucash.org/mailman/listinfo/gnucash-changes
>



-- 
       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
       [EMAIL PROTECTED]                        PGP key available

_______________________________________________
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

Reply via email to