r20174 - gnucash/trunk/src - Fix core swig files to have appropriate ifdefs for guile only portions

Christian Stimming cstim at code.gnucash.org
Thu Jan 27 14:09:27 EST 2011


Author: cstim
Date: 2011-01-27 14:09:27 -0500 (Thu, 27 Jan 2011)
New Revision: 20174
Trac: http://svn.gnucash.org/trac/changeset/20174

Modified:
   gnucash/trunk/src/app-utils/app-utils.i
   gnucash/trunk/src/engine/business-core.i
   gnucash/trunk/src/engine/engine.i
Log:
Fix core swig files to have appropriate ifdefs for guile only portions

Patch by Andy Clayton <q3aiml at gmail.com>

Modified: gnucash/trunk/src/app-utils/app-utils.i
===================================================================
--- gnucash/trunk/src/app-utils/app-utils.i	2011-01-27 19:02:35 UTC (rev 20173)
+++ gnucash/trunk/src/app-utils/app-utils.i	2011-01-27 19:09:27 UTC (rev 20174)
@@ -16,9 +16,13 @@
 #include <app-utils/gnc-sx-instance-model.h>
 
 #include "engine-helpers.h"
+%}
 
+#if defined(SWIGGUILE)
+%{
 SCM scm_init_sw_app_utils_module (void);
 %}
+#endif
 
 %import "base-typemaps.i"
 
@@ -39,6 +43,7 @@
 void gnc_option_db_set_option_selectable_by_name(SCM guile_option,
       const char *section, const char *name, gboolean selectable);
 
+#if defined(SWIGGUILE)
 %typemap(out) GncCommodityList * {
   SCM list = SCM_EOL;
   GList *node;
@@ -135,3 +140,4 @@
 }
 GHashTable* gnc_sx_all_instantiate_cashflow_all(GDate range_start, GDate range_end);
 %clear GHashTable *;
+#endif

Modified: gnucash/trunk/src/engine/business-core.i
===================================================================
--- gnucash/trunk/src/engine/business-core.i	2011-01-27 19:02:35 UTC (rev 20173)
+++ gnucash/trunk/src/engine/business-core.i	2011-01-27 19:09:27 UTC (rev 20174)
@@ -2,7 +2,6 @@
 %{
 /* Includes the header in the wrapper code */
 #include <config.h>
-#include <guile-mappings.h>
 #include <gncAddress.h>
 #include <gncBillTerm.h>
 #include <gncCustomer.h>
@@ -14,6 +13,11 @@
 #include <gncOwner.h>
 #include <gncTaxTable.h>
 #include <gncVendor.h>
+%}
+
+#if defined(SWIGGUILE)
+%{
+#include <guile-mappings.h>
 #include <gncBusGuile.h>
 #ifdef _MSC_VER
 # define snprintf _snprintf
@@ -32,6 +36,7 @@
 
 SCM scm_init_sw_business_core_module (void);
 %}
+#endif
 
 %import "base-typemaps.i"
 
@@ -81,6 +86,7 @@
 GLIST_HELPER_INOUT(GncTaxTableEntryList, SWIGTYPE_p__gncTaxTableEntry);
 GLIST_HELPER_INOUT(OwnerList, SWIGTYPE_p__gncOwner);
 
+#if defined(SWIGGUILE)
 %typemap(in) GncAccountValue * "$1 = gnc_scm_to_account_value_ptr($input);"
 %typemap(out) GncAccountValue * "$result = gnc_account_value_ptr_to_scm($1);"
 %typemap(in) AccountValueList * {
@@ -111,9 +117,9 @@
 
   $result = scm_reverse(list);
 }
+#endif
 
 
-
 /* Parse the header files to generate wrappers */
 %include <gncAddress.h>
 %include <gncBillTerm.h>
@@ -127,7 +133,9 @@
 %include <gncOwner.h>
 %include <gncTaxTable.h>
 %include <gncVendor.h>
+#if defined(SWIGGUILE)
 %include <gncBusGuile.h>
+#endif
 /* Import query bindings for the below invoice query functions (but
  * don't generate bindings for them). */
 %import <libqof/qof/qofquery.h>
@@ -150,6 +158,7 @@
 }
 %}
 
+#if defined(SWIGGUILE)
 %init {
   {
     char tmp[100];
@@ -183,3 +192,4 @@
   }
 
 }
+#endif

Modified: gnucash/trunk/src/engine/engine.i
===================================================================
--- gnucash/trunk/src/engine/engine.i	2011-01-27 19:02:35 UTC (rev 20173)
+++ gnucash/trunk/src/engine/engine.i	2011-01-27 19:09:27 UTC (rev 20174)
@@ -175,7 +175,7 @@
 
 %clear GSList *key_path;
 
-
+#if defined(SWIGGUILE)
 %init {
   {
     char tmp[100];
@@ -295,4 +295,4 @@
   }
 
 }
-
+#endif



More information about the gnucash-changes mailing list