gnucash maint: Multiple changes pushed
Christopher Lam
clam at code.gnucash.org
Mon May 31 11:13:16 EDT 2021
Updated via https://github.com/Gnucash/gnucash/commit/be19b489 (commit)
via https://github.com/Gnucash/gnucash/commit/c3ed055f (commit)
via https://github.com/Gnucash/gnucash/commit/4a45d360 (commit)
from https://github.com/Gnucash/gnucash/commit/ec9cdd15 (commit)
commit be19b489e47884ab65ce4a69b594b0b9578fe62f
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Sun May 30 22:47:53 2021 +0800
[gncEntryLedger] free taxes, a list of GncAccountValue
diff --git a/gnucash/register/ledger-core/gncEntryLedger.c b/gnucash/register/ledger-core/gncEntryLedger.c
index ca4378847..bff49b369 100644
--- a/gnucash/register/ledger-core/gncEntryLedger.c
+++ b/gnucash/register/ledger-core/gncEntryLedger.c
@@ -788,6 +788,7 @@ gnc_entry_ledger_compute_value (GncEntryLedger *ledger,
/* return the tax value */
taxes_unrounded = gncAccountValueTotal (taxes);
+ gncAccountValueDestroy (taxes);
if (tax_value)
*tax_value = gnc_numeric_convert (taxes_unrounded, denom,
GNC_HOW_RND_ROUND_HALF_UP);
commit c3ed055f31c31234f54c615bcee8b266296f6e21
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Sun May 30 22:35:04 2021 +0800
[gncEntryLedgerModel] const functions should return static buffer
diff --git a/gnucash/register/ledger-core/gncEntryLedgerModel.c b/gnucash/register/ledger-core/gncEntryLedgerModel.c
index 0a123839e..717b8349a 100644
--- a/gnucash/register/ledger-core/gncEntryLedgerModel.c
+++ b/gnucash/register/ledger-core/gncEntryLedgerModel.c
@@ -188,7 +188,10 @@ static const char * get_date_entry (VirtualLocation virt_loc,
GncEntryLedger *ledger = user_data;
GncEntry *entry = gnc_entry_ledger_get_entry (ledger, virt_loc.vcell_loc);
time64 time = gncEntryGetDate (entry);
- return qof_print_date(time);
+ static gchar dateBuff [MAX_DATE_LENGTH+1];
+ memset (dateBuff, 0, sizeof (dateBuff));
+ qof_print_date_buff (dateBuff, MAX_DATE_LENGTH, time);
+ return dateBuff;
}
static const char * get_desc_entry (VirtualLocation virt_loc,
commit 4a45d36047e55be44a4e9cdcf617333b7d1625a9
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Sun May 30 22:35:00 2021 +0800
[split-register-model] const functions should return static buffer
diff --git a/gnucash/register/ledger-core/split-register-model.c b/gnucash/register/ledger-core/split-register-model.c
index 54dd8504d..a565af9e9 100644
--- a/gnucash/register/ledger-core/split-register-model.c
+++ b/gnucash/register/ledger-core/split-register-model.c
@@ -924,6 +924,7 @@ gnc_split_register_get_due_date_entry (VirtualLocation virt_loc,
Split* split;
gboolean is_current;
char type;
+ static gchar dateBuff [MAX_DATE_LENGTH+1];
is_current = virt_cell_loc_equal (reg->table->current_cursor_loc.vcell_loc,
virt_loc.vcell_loc);
@@ -960,7 +961,9 @@ gnc_split_register_get_due_date_entry (VirtualLocation virt_loc,
//PWARN ("returning valid due_date entry");
- return qof_print_date (xaccTransRetDateDue (trans));
+ memset (dateBuff, 0, sizeof (dateBuff));
+ qof_print_date_buff (dateBuff, MAX_DATE_LENGTH, xaccTransRetDateDue (trans));
+ return dateBuff;
}
static const char*
@@ -972,12 +975,16 @@ gnc_split_register_get_date_entry (VirtualLocation virt_loc,
SplitRegister* reg = user_data;
Transaction* trans;
Split* split;
+ static gchar dateBuff [MAX_DATE_LENGTH+1];
split = gnc_split_register_get_split (reg, virt_loc.vcell_loc);
trans = xaccSplitGetParent (split);
if (!trans)
return NULL;
- return qof_print_date (xaccTransRetDatePosted (trans));
+
+ memset (dateBuff, 0, sizeof (dateBuff));
+ qof_print_date_buff (dateBuff, MAX_DATE_LENGTH, xaccTransRetDatePosted (trans));
+ return dateBuff;
}
static char*
Summary of changes:
gnucash/register/ledger-core/gncEntryLedger.c | 1 +
gnucash/register/ledger-core/gncEntryLedgerModel.c | 5 ++++-
gnucash/register/ledger-core/split-register-model.c | 11 +++++++++--
3 files changed, 14 insertions(+), 3 deletions(-)
More information about the gnucash-changes
mailing list