gnucash maint: g_list_free swigged GList* arguments
Christopher Lam
clam at code.gnucash.org
Sat Oct 16 00:58:07 EDT 2021
Updated via https://github.com/Gnucash/gnucash/commit/16184daf (commit)
from https://github.com/Gnucash/gnucash/commit/df2d9bcf (commit)
commit 16184daf9573bef0a1892985747711f890a39eed
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Sat Oct 16 12:19:15 2021 +0800
g_list_free swigged GList* arguments
used by xaccQueryAddAccountMatch and gnc_price_list_equal. SplitList
TransList LotList and CommodityList are not currently being passed as
arguments.
diff --git a/bindings/engine.i b/bindings/engine.i
index a8fe5827d..bdc9057f3 100644
--- a/bindings/engine.i
+++ b/bindings/engine.i
@@ -67,7 +67,6 @@ GLIST_HELPER_INOUT(TransList, SWIGTYPE_p_Transaction);
GLIST_HELPER_INOUT(LotList, SWIGTYPE_p_GNCLot);
GLIST_HELPER_INOUT(AccountList, SWIGTYPE_p_Account);
GLIST_HELPER_INOUT(PriceList, SWIGTYPE_p_GNCPrice);
-// TODO: free PriceList?
GLIST_HELPER_INOUT(CommodityList, SWIGTYPE_p_gnc_commodity);
%typemap(newfree) gchar * "g_free($1);"
@@ -103,6 +102,13 @@ static const GncGUID * gncBudgetGetGUID(GncBudget *x)
{ return qof_instance_get_guid(QOF_INSTANCE(x)); }
%}
+%typemap (freearg) AccountList * "g_list_free ($1);"
+%typemap (freearg) PriceList * "g_list_free ($1);"
+%typemap (freearg) SplitList * "g_list_free ($1);"
+%typemap (freearg) TransList * "g_list_free ($1);"
+%typemap (freearg) LotList * "g_list_free ($1);"
+%typemap (freearg) CommodityList * "g_list_free ($1);"
+
/* NB: The object ownership annotations should already cover all the
functions currently used in guile, but not all the functions that are
wrapped. So, we should contract the interface to wrap only the used
Summary of changes:
bindings/engine.i | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
More information about the gnucash-changes
mailing list