gnucash stable: Multiple changes pushed

John Ralls jralls at code.gnucash.org
Sat Oct 14 20:30:34 EDT 2023


Updated	 via  https://github.com/Gnucash/gnucash/commit/8046eb2c (commit)
	 via  https://github.com/Gnucash/gnucash/commit/52f1076b (commit)
	from  https://github.com/Gnucash/gnucash/commit/8b3d0bee (commit)



commit 8046eb2c0883b884052b241ec6bf331132194cd1
Merge: 8b3d0beea7 52f1076b30
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat Oct 14 17:29:52 2023 -0700

    Merge Sherlock's 'bug-799104' into stable.


commit 52f1076b300cb6bcf832fa6cccf04ac0021cf845
Author: Sherlock <119709043+agwekixj at users.noreply.github.com>
Date:   Fri Oct 13 16:58:54 2023 -0700

    Bug 799104 - "Asset Chart" broken

diff --git a/libgnucash/engine/gnc-pricedb.cpp b/libgnucash/engine/gnc-pricedb.cpp
index 47ddac57e7..7d335ebe10 100644
--- a/libgnucash/engine/gnc-pricedb.cpp
+++ b/libgnucash/engine/gnc-pricedb.cpp
@@ -2179,9 +2179,9 @@ gnc_pricedb_lookup_day_t64(GNCPriceDB *db,
 }
 
 // return 0 if price's time matches exactly
-static int price_same_time (GNCPrice *p, time64 time)
+static int price_same_time (GNCPrice *p, time64 *time)
 {
-    return !(gnc_price_get_time64 (p) == time);
+    return !(gnc_price_get_time64 (p) == *time);
 }
 
 GNCPrice *
@@ -2194,7 +2194,7 @@ gnc_pricedb_lookup_at_time64(GNCPriceDB *db,
     if (!db || !c || !currency) return NULL;
     ENTER ("db=%p commodity=%p currency=%p", db, c, currency);
     auto price_list = pricedb_get_prices_internal (db, c, currency, TRUE);
-    auto p = g_list_find_custom (price_list, GUINT_TO_POINTER(t), (GCompareFunc) price_same_time);
+    auto p = g_list_find_custom (price_list, &t, (GCompareFunc) price_same_time);
     if (p)
     {
         rv = GNC_PRICE (p->data);
@@ -2325,9 +2325,9 @@ gnc_pricedb_lookup_nearest_in_time64(GNCPriceDB *db,
 }
 
 // return 0 if price's time is less or equal to time
-static int price_time64_less_or_equal (GNCPrice *p, time64 time)
+static int price_time64_less_or_equal (GNCPrice *p, time64 *time)
 {
-    return !(gnc_price_get_time64 (p) <= time);
+    return !(gnc_price_get_time64 (p) <= *time);
 }
 
 GNCPrice *
@@ -2341,7 +2341,7 @@ gnc_pricedb_lookup_nearest_before_t64 (GNCPriceDB *db,
     ENTER ("db=%p commodity=%p currency=%p", db, c, currency);
     auto price_list = pricedb_get_prices_internal (db, c, currency, TRUE);
     if (!price_list) return NULL;
-    auto p = g_list_find_custom (price_list, GUINT_TO_POINTER(t), (GCompareFunc)price_time64_less_or_equal);
+    auto p = g_list_find_custom (price_list, &t, (GCompareFunc)price_time64_less_or_equal);
     if (p)
     {
         current_price = GNC_PRICE (p->data);



Summary of changes:
 libgnucash/engine/gnc-pricedb.cpp | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)



More information about the gnucash-changes mailing list