r14661 - gnucash/branches/swigify/src/business/business-gnome - Correct the runtime-handling of SWIG-wrapped enums.
Chris Shoemaker
chris at cvs.gnucash.org
Sun Aug 13 00:06:42 EDT 2006
Author: chris
Date: 2006-08-13 00:06:41 -0400 (Sun, 13 Aug 2006)
New Revision: 14661
Trac: http://svn.gnucash.org/trac/changeset/14661
Modified:
gnucash/branches/swigify/src/business/business-gnome/business-options-gnome.c
Log:
Correct the runtime-handling of SWIG-wrapped enums.
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-13 03:44:09 UTC (rev 14660)
+++ gnucash/branches/swigify/src/business/business-gnome/business-options-gnome.c 2006-08-13 04:06:41 UTC (rev 14661)
@@ -97,8 +97,9 @@
get_owner_type_from_option (GNCOption *option)
{
SCM odata = gnc_option_get_option_data (option);
- //SCM conv_func;
- /* CHECKME */
+
+ /* SWIG-wrapped enum values are thunks that evaluate to the enum value */
+ odata = scm_call_0(odata);
return (GncOwnerType) scm_num2int(odata, SCM_ARG1, __FUNCTION__);
/*
conv_func = scm_c_eval_string ("gw:enum-<gnc:GncOwnerType>-val->int");
More information about the gnucash-changes
mailing list