r18612 - gnucash/trunk/src - Corrections to r18610 to permit compiling against older versions of glib

John Ralls jralls at code.gnucash.org
Thu Feb 4 18:19:15 EST 2010


Author: jralls
Date: 2010-02-04 18:19:15 -0500 (Thu, 04 Feb 2010)
New Revision: 18612
Trac: http://svn.gnucash.org/trac/changeset/18612

Modified:
   gnucash/trunk/src/gnome/window-autoclear.c
   gnucash/trunk/src/report/standard-reports/standard-reports.scm
Log:
Corrections to r18610 to permit compiling against older versions of glib

Modified: gnucash/trunk/src/gnome/window-autoclear.c
===================================================================
--- gnucash/trunk/src/gnome/window-autoclear.c	2010-02-04 13:13:47 UTC (rev 18611)
+++ gnucash/trunk/src/gnome/window-autoclear.c	2010-02-04 23:19:15 UTC (rev 18612)
@@ -104,7 +104,7 @@
 {
   gnc_numeric n1 = *(gnc_numeric *)v1;
   gdouble d1 = gnc_numeric_to_double(n1);
-  return g_double_hash(&d1);
+  return g_str_hash(&d1);
 }
 
 static void
@@ -160,14 +160,15 @@
     gnc_numeric split_value = xaccSplitGetAmount(split);
 
     GHashTableIter iter;
-    gnc_numeric *key;
+    gnc_numeric *key = NULL;
+	gpointer pkey = (gpointer)key; 
     GList *reachable_list = 0, *node;
 
     printf("  Split value: %s\n", gnc_numeric_to_string(split_value));
 
     /* For each value in the sack */
     g_hash_table_iter_init (&iter, sack);
-    while (g_hash_table_iter_next (&iter, (gpointer *)&key, NULL))
+    while (g_hash_table_iter_next (&iter, &pkey, NULL))
     {
       /* Compute a new reachable value */
       gnc_numeric reachable_value = gnc_numeric_add_fixed(*key, split_value);
@@ -203,10 +204,11 @@
   printf("Rebuilding solution ...\n");
   while (!gnc_numeric_zero_p(toclear_value))
   {
-    Split *split;
+    Split *split = NULL;
+	gpointer psplit = (gpointer)split;
 
     printf("  Left to clear: %s\n", gnc_numeric_to_string(toclear_value));
-    if (g_hash_table_lookup_extended(sack, &toclear_value, NULL, (gpointer *)&split))
+    if (g_hash_table_lookup_extended(sack, &toclear_value, NULL, &psplit))
     {
       if (split != NULL)
       {

Modified: gnucash/trunk/src/report/standard-reports/standard-reports.scm
===================================================================
--- gnucash/trunk/src/report/standard-reports/standard-reports.scm	2010-02-04 13:13:47 UTC (rev 18611)
+++ gnucash/trunk/src/report/standard-reports/standard-reports.scm	2010-02-04 23:19:15 UTC (rev 18612)
@@ -66,6 +66,7 @@
 	    (begin (gnc:debug "get-non-split...") (get-non-split type-info)))
 	#f)))
 
+
 ;; Returns a list of files in a directory
 ;;
 ;; Param:
@@ -73,6 +74,7 @@
 ;;
 ;; Return value:
 ;;   list of files in the directory
+
 (define (directory-files dir)
     (let ((dir-stream (opendir dir)))
         (let loop ((new (readdir dir-stream))



More information about the gnucash-changes mailing list