gnucash maint: Multiple changes pushed

John Ralls jralls at code.gnucash.org
Tue Sep 7 15:15:12 EDT 2021


Updated	 via  https://github.com/Gnucash/gnucash/commit/ab24c346 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/4a8acf3f (commit)
	from  https://github.com/Gnucash/gnucash/commit/ae559089 (commit)



commit ab24c3466076f2c882b556f87c92b1b5cfd03f68
Merge: ae559089d 4a8acf3fb
Author: John Ralls <jralls at ceridwen.us>
Date:   Tue Sep 7 12:14:41 2021 -0700

    Merge Simon Arlott's 'free-template-root' into maint.


commit 4a8acf3fb2417c82e8b4dbf0ae4655535ec5a0af
Author: Simon Arlott <sa.me.uk>
Date:   Sun Jul 11 15:58:34 2021 +0100

    Free template root accounts on book end
    
    The template root should be unset so that it's destroyed when the book is
    ending. This is required to free all the template accounts and referenced
    strings.
    
    The scheduled transactions themselves need to be freed first so reverse
    the order that SXRegister and gnc_sxtt_register are called in
    cashobjects_register: The list resulting from that function is traversed
    from the bottom up.

diff --git a/libgnucash/engine/SX-book.c b/libgnucash/engine/SX-book.c
index e15cb57f0..d8d8c27db 100644
--- a/libgnucash/engine/SX-book.c
+++ b/libgnucash/engine/SX-book.c
@@ -127,7 +127,7 @@ sxtg_book_begin (QofBook *book)
 static void
 sxtg_book_end (QofBook *book)
 {
-//    gnc_book_set_template_root (book, NULL);
+    gnc_book_set_template_root (book, NULL);
 }
 
 static gboolean
diff --git a/libgnucash/engine/cashobjects.c b/libgnucash/engine/cashobjects.c
index 903705d34..fd3ae3426 100644
--- a/libgnucash/engine/cashobjects.c
+++ b/libgnucash/engine/cashobjects.c
@@ -73,8 +73,8 @@ cashobjects_register(void)
     g_return_val_if_fail(xaccAccountRegister(), FALSE);
     g_return_val_if_fail ( xaccTransRegister(), FALSE);
     g_return_val_if_fail ( xaccSplitRegister(), FALSE);
-    g_return_val_if_fail ( SXRegister (),       FALSE);
     g_return_val_if_fail ( gnc_sxtt_register(), FALSE);
+    g_return_val_if_fail ( SXRegister (),       FALSE);
     g_return_val_if_fail(gnc_pricedb_register(), FALSE);
     g_return_val_if_fail (gnc_budget_register(), FALSE);
     g_return_val_if_fail ( gnc_lot_register (), FALSE);



Summary of changes:
 libgnucash/engine/SX-book.c     | 2 +-
 libgnucash/engine/cashobjects.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)



More information about the gnucash-changes mailing list