Derek Atkins wrote:
Hi,
Chris Dennis <[email protected]> writes:
<snip>
By trial and error, I seem to have worked out how to fix this.
I'll post a patch when I've tested it a bit more.
Attached is a small patch which corrects the Swig wrapping for
gncTaxTableGetEntries, and allows my eguile-based report (of which more
later) to display tax details.
If the patch is not in the right format, please let me know. I just did
'svn diff'.
cheers
Chris
--
Chris Dennis [email protected]
Fordingbridge, Hampshire, UK
Index: src/business/business-core/gncTaxTable.h
===================================================================
--- src/business/business-core/gncTaxTable.h (revision 17959)
+++ src/business/business-core/gncTaxTable.h (working copy)
@@ -40,7 +40,7 @@
@param QofInstance inst;
@param char * name;
-...@param GList * entries;
+...@param GncTaxTableEntryList* entries;
@param Timespec modtime;
@param gint64 refcount;
@param GncTaxTable * parent; if non-null, we are an immutable child
@@ -153,7 +153,8 @@
GncTaxTable *gncTaxTableGetParent (const GncTaxTable *table);
GncTaxTable *gncTaxTableReturnChild (GncTaxTable *table, gboolean make_new);
#define gncTaxTableGetChild(t) gncTaxTableReturnChild((t),FALSE)
-GList *gncTaxTableGetEntries (const GncTaxTable *table);
+typedef GList GncTaxTableEntryList;
+GncTaxTableEntryList* gncTaxTableGetEntries (const GncTaxTable *table);
gint64 gncTaxTableGetRefcount (const GncTaxTable *table);
Timespec gncTaxTableLastModified (const GncTaxTable *table);
Index: src/business/business-core/business-core.i
===================================================================
--- src/business/business-core/business-core.i (revision 17959)
+++ src/business/business-core/business-core.i (working copy)
@@ -73,6 +73,7 @@
%}
GLIST_HELPER_INOUT(EntryList, SWIGTYPE_p__gncEntry);
+GLIST_HELPER_INOUT(GncTaxTableEntryList, SWIGTYPE_p__gncTaxTableEntry);
%typemap(in) GncAccountValue * "$1 = gnc_scm_to_account_value_ptr($input);"
%typemap(out) GncAccountValue * "$result = gnc_account_value_ptr_to_scm($1);"
Index: src/business/business-core/gncTaxTable.c
===================================================================
--- src/business/business-core/gncTaxTable.c (revision 17959)
+++ src/business/business-core/gncTaxTable.c (working copy)
@@ -36,7 +36,7 @@
{
QofInstance inst;
char * name;
- GList * entries;
+ GncTaxTableEntryList* entries;
Timespec modtime; /* internal date of last modtime */
/* See src/doc/business.txt for an explanation of the following */
@@ -633,7 +633,7 @@
return table->parent;
}
-GList *gncTaxTableGetEntries (const GncTaxTable *table)
+GncTaxTableEntryList* gncTaxTableGetEntries (const GncTaxTable *table)
{
if (!table) return NULL;
return table->entries;
_______________________________________________
gnucash-devel mailing list
[email protected]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel