r14638 - gnucash/branches/swigify/src/business/business-gnome - This appears to be the swig way of using the swig runtime system to wrap
Chris Shoemaker
chris at cvs.gnucash.org
Fri Aug 11 01:31:30 EDT 2006
Author: chris
Date: 2006-08-11 01:31:29 -0400 (Fri, 11 Aug 2006)
New Revision: 14638
Trac: http://svn.gnucash.org/trac/changeset/14638
Modified:
gnucash/branches/swigify/src/business/business-gnome/business-options-gnome.c
gnucash/branches/swigify/src/business/business-gnome/dialog-invoice.c
Log:
This appears to be the swig way of using the swig runtime system to wrap
C pointers for passing to guile functions.
Modified: gnucash/branches/swigify/src/business/business-gnome/business-options-gnome.c
===================================================================
--- gnucash/branches/swigify/src/business/business-gnome/business-options-gnome.c 2006-08-11 05:29:31 UTC (rev 14637)
+++ gnucash/branches/swigify/src/business/business-gnome/business-options-gnome.c 2006-08-11 05:31:29 UTC (rev 14638)
@@ -407,6 +407,8 @@
return FALSE;
}
+#include "swig-runtime.h"
+
/* Function to get the UI Value for a particular option */
static SCM
invoice_get_value (GNCOption *option, GtkWidget *widget)
@@ -414,7 +416,8 @@
GncInvoice *invoice;
invoice = gnc_general_search_get_selected (GNC_GENERAL_SEARCH (widget));
- return gw_wcp_assimilate_ptr (invoice, scm_c_eval_string("<gnc:GncInvoice*>"));
+ return SWIG_NewPointerObj(invoice, SWIG_TypeQuery("_p_GncInvoice"), 0);
+ //return gw_wcp_assimilate_ptr (invoice, scm_c_eval_string("<gnc:GncInvoice*>"));
}
Modified: gnucash/branches/swigify/src/business/business-gnome/dialog-invoice.c
===================================================================
--- gnucash/branches/swigify/src/business/business-gnome/dialog-invoice.c 2006-08-11 05:29:31 UTC (rev 14637)
+++ gnucash/branches/swigify/src/business/business-gnome/dialog-invoice.c 2006-08-11 05:31:29 UTC (rev 14638)
@@ -555,6 +555,8 @@
}
}
+#include "swig-runtime.h"
+
void
gnc_invoice_window_printCB (GtkWidget *widget, gpointer data)
{
@@ -569,7 +571,8 @@
func = scm_c_eval_string ("gnc:invoice-report-create");
g_return_if_fail (SCM_PROCEDUREP (func));
- arg = gw_wcp_assimilate_ptr (invoice, scm_c_eval_string("<gnc:GncInvoice*>"));
+ arg = SWIG_NewPointerObj(invoice, SWIG_TypeQuery("_p_GncInvoice"), 0);
+ //arg = gw_wcp_assimilate_ptr (invoice, scm_c_eval_string("<gnc:GncInvoice*>"));
args = scm_cons (arg, args);
/* scm_gc_protect_object(func); */
More information about the gnucash-changes
mailing list