diff options
author | Cedric BAIL <cedric.bail@samsung.com> | 2014-01-20 12:57:28 +0900 |
---|---|---|
committer | Cedric BAIL <cedric.bail@samsung.com> | 2014-01-20 13:01:31 +0900 |
commit | 04f7b59e1178bf51694db6b1897bf35ec9c46664 (patch) | |
tree | c68bf050ca4756b059e5d2b025a9568a8f293842 /src/modules/quickaccess | |
parent | b48dc88f942e209339ec4693938f67d919914918 (diff) | |
download | enlightenment-04f7b59e1178bf51694db6b1897bf35ec9c46664.tar.gz |
e: call the right function without depending on ld to figure it out (mostly wrongly).
As a side note, using an EAPI function from within a module is a call for disaster.
Their is no guarantee from ld that it will be the current top open .so, actually it
is most likely not going to be the case. So it will do a search for the symbol in the
current stack of open .so and the first one to match will be chosen.
I do think it basically prove that current model of Enlightenment module is fairly
borken and error prone. Hope to have time to fix that, but it will involve completely
breaking the API and ABI compatibility of E module.
Diffstat (limited to 'src/modules/quickaccess')
-rw-r--r-- | src/modules/quickaccess/e_mod_main.c | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/src/modules/quickaccess/e_mod_main.c b/src/modules/quickaccess/e_mod_main.c index 105495ebc9..d2402a18e6 100644 --- a/src/modules/quickaccess/e_mod_main.c +++ b/src/modules/quickaccess/e_mod_main.c @@ -25,6 +25,23 @@ Config *qa_config = NULL; EAPI E_Module_Api e_modapi = {E_MODULE_API_VERSION, "Quickaccess"}; ////////////////////////////// +static void +_e_modapi_shutdown(void) +{ + e_qa_shutdown(); + + conf_edd = e_qa_config_dd_free(); + eina_log_domain_unregister(_e_quick_access_log_dom); + _e_quick_access_log_dom = -1; + + e_configure_registry_item_del("launcher/quickaccess"); + e_configure_registry_category_del("launcher"); + + e_qa_config_free(qa_config); + E_FREE(qa_mod); + qa_config = NULL; +} + EAPI void * e_modapi_init(E_Module *m) { @@ -59,7 +76,7 @@ e_modapi_init(E_Module *m) if (!e_qa_init()) { - e_modapi_shutdown(NULL); + _e_modapi_shutdown(); return NULL; } @@ -69,18 +86,7 @@ e_modapi_init(E_Module *m) EAPI int e_modapi_shutdown(E_Module *m __UNUSED__) { - e_qa_shutdown(); - - conf_edd = e_qa_config_dd_free(); - eina_log_domain_unregister(_e_quick_access_log_dom); - _e_quick_access_log_dom = -1; - - e_configure_registry_item_del("launcher/quickaccess"); - e_configure_registry_category_del("launcher"); - - e_qa_config_free(qa_config); - E_FREE(qa_mod); - qa_config = NULL; + _e_modapi_shutdown(); return 1; } |