gnucash/bindings/guile
John Ralls b4b8431984 Bug 798778 - GnuCashquits abruptly when attempting to edit options…
for certain reports.

Those reports being ones using complex options, apparently because
the callbacks weren't protected from Guile's garbage collector.

So replace the anyway ugly hack of a void* with a std::any wrapping
a class holding a std::unique_ptr with a custom deleter. The
constructor calls scm_gc_protect_object on the SCM containing the
callback and the custom deleter calls scm_gc_unprotect_object. The
copy constructor, required for std::any, makes a new std::unique_ptr
and calls scm_gc_protect_object again ensuring that the protect and
unprotect calls are symmetrical.

Meanwhile std::any hides the Guile dependency from all the classes
that don't need to know about it. The only ugliness is that there's
no good place to put a common implementation of SCNCallbackWrapper so it's
repeated in gnc-optiondb.i and dialog-options.cpp.
2023-03-16 17:50:06 -07:00
..
test [c++options] Implement GncOptionGncOwnerValue class. 2023-03-14 16:11:39 -07:00
app-utils.scm [options] Move options from app-utils to engine. 2022-08-25 22:09:56 -07:00
business-core.scm [business-core] remove gnc:split->owner 2023-02-13 23:29:00 +08:00
c-interface.scm Move gnc_ui_account_get_tax_info_string to gnc-locale-tax.c 2022-07-17 10:00:23 -07:00
CMakeLists.txt Add missing MAKE_LINKS, and the local scm directory to %load-path 2023-02-28 11:51:23 +00:00
core-utils.scm [core-utils] modify gnc:format to accept - 2023-01-17 00:24:08 +08:00
date-utilities.scm Merge branch 'maint' 2022-08-25 23:47:18 +08:00
engine.scm Remove deprecated functions 2022-03-28 23:02:38 +08:00
expressions.i Move gnc_ui_account_get_tax_info_string to gnc-locale-tax.c 2022-07-17 10:00:23 -07:00
fin.scm Move gnc_ui_account_get_tax_info_string to gnc-locale-tax.c 2022-07-17 10:00:23 -07:00
glib-guile.c Remove support code that was only used by price-quotes.scm 2022-10-02 11:50:26 -07:00
glib-guile.h Use internal extern "C" { ... } for C++ 2023-01-23 18:40:01 +00:00
gnc-engine-guile.cpp Remove some unused variables with obviously no side effects 2023-02-06 14:19:22 +00:00
gnc-engine-guile.h Use internal extern "C" { ... } for C++ 2023-01-23 18:40:01 +00:00
gnc-guile-bindings.c Restore setting swig engine initialization flag. 2021-11-13 11:10:17 -08:00
gnc-guile-utils.c Don't g_strdup char* from scm_to_locale|utf8_string 2021-10-30 22:26:33 +08:00
gnc-guile-utils.h Use internal extern "C" { ... } for C++ 2023-01-23 18:40:01 +00:00
gnc-helpers.c Remove support code that was only used by price-quotes.scm 2022-10-02 11:50:26 -07:00
gnc-helpers.h Use internal extern "C" { ... } for C++ 2023-01-23 18:40:01 +00:00
gnc-kvp-guile.cpp Guard against some possible null pointer dereferences 2023-03-08 11:00:56 +00:00
gnc-kvp-guile.h Use internal extern "C" { ... } for C++ 2023-01-23 18:40:01 +00:00
gnc-numeric.scm [modularise] (gnucash engine) 2020-12-09 06:39:51 +08:00
gnc-optiondb.i Bug 798778 - GnuCashquits abruptly when attempting to edit options… 2023-03-16 17:50:06 -07:00
options.scm [c++options] Implement GncOptionGncOwnerValue class. 2023-03-14 16:11:39 -07:00
utilities.scm Bindings - move log wrappers into the swig interface files 2022-10-02 11:50:26 -07:00