From 52600bbd1f9a8a2c0bc04edca605572c8ccbd50b Mon Sep 17 00:00:00 2001 From: John Ralls Date: Wed, 8 Apr 2020 12:11:16 -0700 Subject: [PATCH] Instantiate gnc_register_number_range_option templates in SWIG. --- libgnucash/app-utils/gnc-optiondb.i | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/libgnucash/app-utils/gnc-optiondb.i b/libgnucash/app-utils/gnc-optiondb.i index b9472eb968..06bac06d4f 100644 --- a/libgnucash/app-utils/gnc-optiondb.i +++ b/libgnucash/app-utils/gnc-optiondb.i @@ -142,6 +142,12 @@ scm_to_value(SCM new_value) return scm_to_int64(new_value); } +template <> inline double +scm_to_value(SCM new_value) +{ + return scm_to_double(new_value); +} + template <>inline SCM scm_from_value(GncOptionAccountList value) { @@ -384,7 +390,10 @@ wrap_unique_ptr(GncOptionDBPtr, GncOptionDB); %template(set_option_string) set_option; %template(set_option_int) set_option; %template(set_option_time64) set_option; - }; +}; + +%template(gnc_register_number_range_option_double) gnc_register_number_range_option; +%template(gnc_register_number_range_option_int) gnc_register_number_range_option; %inline %{ using GncOptionDBPtr = std::unique_ptr;