mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
bindings - ensure engine is initialized before any scm code interfaces with it
This is done by invoking gnc_engine_init in the swig initialization routine
This commit is contained in:
parent
1c7f835f47
commit
3d4cc63d73
@ -286,6 +286,7 @@ void qof_book_set_string_option(QofBook* book, const char* opt_name, const char*
|
||||
%init {
|
||||
{
|
||||
char tmp[100];
|
||||
char * no_args[1] = { NULL };
|
||||
|
||||
#define SET_ENUM(e) snprintf(tmp, 100, "(set! %s (%s))", (e), (e)); \
|
||||
scm_c_eval_string(tmp);
|
||||
@ -433,6 +434,8 @@ void qof_book_set_string_option(QofBook* book, const char* opt_name, const char*
|
||||
|
||||
|
||||
#undef SET_ENUM
|
||||
|
||||
gnc_engine_init(0, no_args);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user