[Gnucash-changes] r14137 - gnucash/trunk - Make the removal of scm_block_gc conditional on having guile 1.8

David Hampton hampton at cvs.gnucash.org
Fri May 19 22:02:21 EDT 2006


Author: hampton
Date: 2006-05-19 22:02:20 -0400 (Fri, 19 May 2006)
New Revision: 14137
Trac: http://svn.gnucash.org/trac/changeset/14137

Modified:
   gnucash/trunk/ChangeLog
   gnucash/trunk/configure.in
   gnucash/trunk/macros/legacy_macros.m4
   gnucash/trunk/src/engine/engine-helpers.c
Log:
Make the removal of scm_block_gc conditional on having guile 1.8
installed.


Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog	2006-05-19 23:30:58 UTC (rev 14136)
+++ gnucash/trunk/ChangeLog	2006-05-20 02:02:20 UTC (rev 14137)
@@ -1,5 +1,10 @@
 2006-05-19  David Hampton  <hampton at employees.org>
 
+	* src/engine/engine-helpers.c:
+	* macros/legacy_macros.m4:
+	* configure.in: Make the removal of scm_block_gc conditional on
+	having guile 1.8 installed.
+
 	* src/engine/engine-helpers.c: More of the patch from Bill
 	Nottingham for compiling with guile 1.8.
 

Modified: gnucash/trunk/configure.in
===================================================================
--- gnucash/trunk/configure.in	2006-05-19 23:30:58 UTC (rev 14136)
+++ gnucash/trunk/configure.in	2006-05-20 02:02:20 UTC (rev 14137)
@@ -243,7 +243,7 @@
 G_WRAP_COMPILE_ARGS=""
 G_WRAP_LINK_ARGS=""
 
-AM_GUILE_VERSION_CHECK(1.6, , , [AC_MSG_ERROR([
+AM_GUILE_VERSION_CHECK(1.6.0, , , [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
@@ -258,6 +258,10 @@
 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])
+], )
+
 AM_PATH_GWRAP(1.3.3, , [AC_MSG_ERROR([
 
   g-wrap does not appear to be installed correctly, or is not new

Modified: gnucash/trunk/macros/legacy_macros.m4
===================================================================
--- gnucash/trunk/macros/legacy_macros.m4	2006-05-19 23:30:58 UTC (rev 14136)
+++ gnucash/trunk/macros/legacy_macros.m4	2006-05-20 02:02:20 UTC (rev 14137)
@@ -65,7 +65,7 @@
 
 if test -n "$version_ok"; then
 	AC_MSG_RESULT(yes: $guile_vers_string)
-	ifelse([$3], , true, [$4])
+	ifelse([$3], , true, [$3])
 
 else
 	AC_MSG_RESULT(no: $guile_vers_string)

Modified: gnucash/trunk/src/engine/engine-helpers.c
===================================================================
--- gnucash/trunk/src/engine/engine-helpers.c	2006-05-19 23:30:58 UTC (rev 14136)
+++ gnucash/trunk/src/engine/engine-helpers.c	2006-05-20 02:02:20 UTC (rev 14137)
@@ -1686,6 +1686,10 @@
 
   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);
@@ -1721,6 +1725,9 @@
 
   /* 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);
 }
 
@@ -1925,6 +1932,10 @@
   gboolean si1 = TRUE, si2 = TRUE, si3 = TRUE;
   int max_results = -1;
 
+#ifndef HAVE_GUILE18
+  ++scm_block_gc;
+#endif
+
   while (!SCM_NULLP (query_scm))
   {
     const gchar *symbol;
@@ -2003,6 +2014,10 @@
     }
   }
 
+#ifndef HAVE_GUILE18
+  --scm_block_gc;
+#endif
+
   if (ok && search_for) {
     qof_query_search_for (q, search_for);
     qof_query_set_sort_order (q, sp1, sp2, sp3);



More information about the gnucash-changes mailing list