r14633 - gnucash/branches/swigify/src/business/business-core - SWIG doens't seem to generate a wrapper for the macro functions.

Chris Shoemaker chris at cvs.gnucash.org
Fri Aug 11 01:20:15 EDT 2006


Author: chris
Date: 2006-08-11 01:20:14 -0400 (Fri, 11 Aug 2006)
New Revision: 14633
Trac: http://svn.gnucash.org/trac/changeset/14633

Modified:
   gnucash/branches/swigify/src/business/business-core/gncInvoice.c
   gnucash/branches/swigify/src/business/business-core/gncInvoice.h
Log:
   SWIG doens't seem to generate a wrapper for the macro functions.
   I hope there's some better solution than making a real function out of 
   the macro, but this works for now.  Suggestions welcome.


Modified: gnucash/branches/swigify/src/business/business-core/gncInvoice.c
===================================================================
--- gnucash/branches/swigify/src/business/business-core/gncInvoice.c	2006-08-11 05:17:50 UTC (rev 14632)
+++ gnucash/branches/swigify/src/business/business-core/gncInvoice.c	2006-08-11 05:20:14 UTC (rev 14633)
@@ -94,6 +94,11 @@
   qof_event_gen (&invoice->inst.entity, QOF_EVENT_MODIFY, NULL);
 }
 
+GUID gncInvoiceRetGUID(GncInvoice *x)
+{ 
+    return (x ? *(qof_instance_get_guid(QOF_INSTANCE(x))) : *(guid_null()));
+}
+
 /* ================================================================== */
 /* Create/Destroy Functions */
 

Modified: gnucash/branches/swigify/src/business/business-core/gncInvoice.h
===================================================================
--- gnucash/branches/swigify/src/business/business-core/gncInvoice.h	2006-08-11 05:17:50 UTC (rev 14632)
+++ gnucash/branches/swigify/src/business/business-core/gncInvoice.h	2006-08-11 05:20:14 UTC (rev 14633)
@@ -164,7 +164,6 @@
 #define gncInvoiceLookup(book,guid)    \
        QOF_BOOK_LOOKUP_ENTITY((book),(guid),GNC_ID_INVOICE, GncInvoice)
 
-gboolean gncInvoiceIsDirty (GncInvoice *invoice);
 void gncInvoiceBeginEdit (GncInvoice *invoice);
 void gncInvoiceCommitEdit (GncInvoice *invoice);
 int gncInvoiceCompare (GncInvoice *a, GncInvoice *b);
@@ -195,9 +194,11 @@
 /** deprecated functions */
 #define gncInvoiceGetBook(x) qof_instance_get_book(QOF_INSTANCE(x))
 #define gncInvoiceGetGUID(x) qof_instance_get_guid(QOF_INSTANCE(x))
-#define gncInvoiceRetGUID(x) (x ? *(qof_instance_get_guid(QOF_INSTANCE(x))) : *(guid_null()))
+//#define gncInvoiceRetGUID(x) (x ? *(qof_instance_get_guid(QOF_INSTANCE(x))) : *(guid_null()))
 #define gncInvoiceLookupDirect(G,B) gncInvoiceLookup((B),&(G))
 
+GUID gncInvoiceRetGUID(GncInvoice *x);
+
 #endif /* GNC_INVOICE_H_ */
 /** @} */
 /** @} */



More information about the gnucash-changes mailing list