r20441 - gnucash/trunk - Require guile 1.8.5 and remove all 1.6.x specific conditions

Geert Janssens gjanssens at code.gnucash.org
Mon Mar 21 11:10:40 EDT 2011


Author: gjanssens
Date: 2011-03-21 11:10:40 -0400 (Mon, 21 Mar 2011)
New Revision: 20441
Trac: http://svn.gnucash.org/trac/changeset/20441

Modified:
   gnucash/trunk/configure.ac
   gnucash/trunk/src/app-utils/app-utils.i
   gnucash/trunk/src/app-utils/guile-util.c
   gnucash/trunk/src/engine/engine-helpers.c
   gnucash/trunk/src/engine/engine.i
   gnucash/trunk/src/gnome-utils/gnc-menu-extensions.c
   gnucash/trunk/src/guile-mappings.h
Log:
Require guile 1.8.5 and remove all 1.6.x specific conditions

Modified: gnucash/trunk/configure.ac
===================================================================
--- gnucash/trunk/configure.ac	2011-03-21 15:10:30 UTC (rev 20440)
+++ gnucash/trunk/configure.ac	2011-03-21 15:10:40 UTC (rev 20441)
@@ -403,11 +403,11 @@
 AS_SCRUB_INCLUDE(GUILE_INCS)
 AC_SUBST(GUILE_LIBS)
 
-AM_GUILE_VERSION_CHECK(1.6.7, , , [AC_MSG_ERROR([
+AM_GUILE_VERSION_CHECK(1.8.5, , , [AC_MSG_ERROR([
 
   guile does not appear to be installed correctly, or is not in the
   correct version range.  Perhaps you have not installed the guile
-  development packages?  Gnucash requires at least version 1.6.7 to build.
+  development packages?  Gnucash requires at least version 1.8.5 to build.
 ])])
 
 AC_SUBST(GUILE)
@@ -418,10 +418,6 @@
 AC_DEFINE_UNQUOTED(GNC_GUILE_MICRO_VERSION, ${guile_micro_version},
     [Guile Micro version number])
 
-AM_GUILE_VERSION_CHECK(1.8.0, , [
-  AC_DEFINE(HAVE_GUILE18,1,[System has guile 1.8 or better])
-], )
-
 AS_SCRUB_INCLUDE(CFLAGS)
 
 ### Check size of long_long - some guile's are broken.

Modified: gnucash/trunk/src/app-utils/app-utils.i
===================================================================
--- gnucash/trunk/src/app-utils/app-utils.i	2011-03-21 15:10:30 UTC (rev 20440)
+++ gnucash/trunk/src/app-utils/app-utils.i	2011-03-21 15:10:40 UTC (rev 20441)
@@ -105,7 +105,7 @@
       break;
     key = scm_to_locale_string (key_scm);
     gkey = g_strdup (key);
-    gnc_free_scm_locale_string(key);
+    free (key);
     path = g_list_prepend (path, gkey);
     path_scm = SCM_CDR (path_scm);
   }

Modified: gnucash/trunk/src/app-utils/guile-util.c
===================================================================
--- gnucash/trunk/src/app-utils/guile-util.c	2011-03-21 15:10:30 UTC (rev 20440)
+++ gnucash/trunk/src/app-utils/guile-util.c	2011-03-21 15:10:40 UTC (rev 20441)
@@ -1327,6 +1327,6 @@
     /* scm_to_locale_string() returns a malloc'ed string in guile-1.8
        (but not in guile-1.6).  Copy to a g_malloc'ed one. */
     s = g_strdup(x);
-    gnc_free_scm_locale_string(x);
+    free(x);
     return s;
 }

Modified: gnucash/trunk/src/engine/engine-helpers.c
===================================================================
--- gnucash/trunk/src/engine/engine-helpers.c	2011-03-21 15:10:30 UTC (rev 20440)
+++ gnucash/trunk/src/engine/engine-helpers.c	2011-03-21 15:10:40 UTC (rev 20441)
@@ -1718,10 +1718,6 @@
 
     if (!q) return SCM_BOOL_F;
 
-#ifndef HAVE_GUILE18
-    ++scm_block_gc;
-#endif
-
     /* terms */
     pair = scm_cons (gnc_query_terms2scm (qof_query_get_terms (q)), SCM_EOL);
     pair = scm_cons (scm_str2symbol ("terms"), pair);
@@ -1757,9 +1753,6 @@
 
     /* Reverse this list; tag it as 'query-v2' */
     pair = scm_reverse (query_scm);
-#ifndef HAVE_GUILE18
-    --scm_block_gc;
-#endif
     return scm_cons (scm_str2symbol ("query-v2"), pair);
 }
 
@@ -2019,10 +2012,6 @@
     gboolean si1 = TRUE, si2 = TRUE, si3 = TRUE;
     int max_results = -1;
 
-#ifndef HAVE_GUILE18
-    ++scm_block_gc;
-#endif
-
     while (!scm_is_null (query_scm))
     {
         const gchar *symbol;
@@ -2123,10 +2112,6 @@
         }
     }
 
-#ifndef HAVE_GUILE18
-    --scm_block_gc;
-#endif
-
     if (ok && search_for)
     {
         qof_query_search_for (q, search_for);

Modified: gnucash/trunk/src/engine/engine.i
===================================================================
--- gnucash/trunk/src/engine/engine.i	2011-03-21 15:10:30 UTC (rev 20440)
+++ gnucash/trunk/src/engine/engine.i	2011-03-21 15:10:40 UTC (rev 20441)
@@ -141,7 +141,7 @@
 
     key = scm_to_locale_string (key_scm);
     gkey = g_strdup (key);
-    gnc_free_scm_locale_string(key);
+    free (key);
 
     path = g_list_prepend (path, gkey);
 

Modified: gnucash/trunk/src/gnome-utils/gnc-menu-extensions.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-menu-extensions.c	2011-03-21 15:10:30 UTC (rev 20440)
+++ gnucash/trunk/src/gnome-utils/gnc-menu-extensions.c	2011-03-21 15:10:40 UTC (rev 20441)
@@ -184,7 +184,7 @@
             {
                 strings[i] = g_strdup(gettext(s));
             }
-            gnc_free_scm_locale_string(s);
+            free(s);
         }
         else
         {

Modified: gnucash/trunk/src/guile-mappings.h
===================================================================
--- gnucash/trunk/src/guile-mappings.h	2011-03-21 15:10:30 UTC (rev 20440)
+++ gnucash/trunk/src/guile-mappings.h	2011-03-21 15:10:40 UTC (rev 20441)
@@ -19,33 +19,11 @@
 
 #include <libguile/version.h> /* for SCM_MAJOR_VERSION etc */
 
-/* Give Guile 1.6 and 1.8 a 2.0-like interface */
-#if (SCM_MAJOR_VERSION == 1) && (SCM_MINOR_VERSION <= 6)
-# define scm_is_bool SCM_BOOLP
-# define scm_is_false SCM_FALSEP
-# define scm_is_null SCM_NULLP
-# define scm_is_number SCM_NUMBERP
-# define scm_is_pair SCM_CONSP
-# define scm_is_string SCM_STRINGP
-# define scm_is_symbol SCM_SYMBOLP
-# define scm_is_true SCM_NFALSEP
-# define scm_is_vector SCM_VECTORP
-# define scm_c_string_length SCM_STRING_LENGTH
-#elif (SCM_MAJOR_VERSION == 1) && (SCM_MINOR_VERSION <= 8)
+/* Give Guile 1.8 a 2.0-like interface */
+#if (SCM_MAJOR_VERSION == 1) && (SCM_MINOR_VERSION <= 8)
 # define scm_c_string_length scm_i_string_length
 #endif
 
-/* The result of SCM_STRING_CHARS must not be free'd, but the result
- * of scm_to_locale_string must. That's bad. We define the macro
- * gnc_free_scm_locale_string to wrap around free() for that
- * reason. */
-#if (SCM_MAJOR_VERSION == 1) && (SCM_MINOR_VERSION <= 6)
-# define scm_to_locale_string SCM_STRING_CHARS
-# define gnc_free_scm_locale_string (void)
-#else
-# define gnc_free_scm_locale_string free
-#endif
-
 /* Convenience macros */
 
 #define scm_is_equal(obj1,obj2)	scm_is_true(scm_equal_p(obj1,obj2))



More information about the gnucash-changes mailing list