static void guile_main(void *closure, int argc, char ** argv) { GNCModule foo; gchar *msg = "Module '../../../libgnucash/gnc-module/test/misc-mods/.libs/libgncmod_futuremodsys.so' requires newer module system\n"; gchar *logdomain = "gnc.module"; guint loglevel = G_LOG_LEVEL_WARNING; TestErrorStruct check = { loglevel, logdomain, msg }; g_log_set_handler (logdomain, loglevel, (GLogFunc)test_checked_handler, &check); g_test_message(" test-load-c.c: testing module load/unload from C ... "); gnc_module_system_init(); foo = gnc_module_load("gnucash/foo", 0); if (!foo) { g_test_message(" Failed to load foo\n"); exit(-1); } if (!gnc_module_unload(foo)) { g_test_message(" Failed to unload foo\n"); exit(-1); } g_test_message(" successful.\n"); exit(0); }
int gnc_module_end(int refcount) { int unload = TRUE; if ( engine != NULL ) { unload = gnc_module_unload(engine); } if ( refcount == 0 ) { engine = NULL; } return unload; }
int libgncmod_business_backend_sql_gnc_module_end(int refcount) { int unload = TRUE; if ( bus_core ) { unload = gnc_module_unload( bus_core ); } if ( refcount == 0 ) { bus_core = NULL; } return unload; }