modules: remove error message from dlsym() when a module is loaded

Summary:
dlsym() could print error message when it tried to load
a nonexistent symbol. Whenever eina_module_load is called,
it checks __eina_module_init symbol. Even if there is no
symbol for init, module loading could be done well.
But, it will print an error message. So, we need to use
EINA_MODULE_INIT, EINA_MODULE_SHUTDOWN in every modules
for removing error messages.

Test Plan: N/A

Reviewers: woohyun, raster, Hermet, seoz, cedric

Reviewed By: cedric

Differential Revision: https://phab.enlightenment.org/D3805

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
This commit is contained in:
Youngbok Shin 2016-03-18 11:54:00 -07:00 committed by Cedric Bail
parent 8b8ad8ad76
commit a0f37fad24
3 changed files with 42 additions and 0 deletions

View File

@ -121,3 +121,17 @@ out_done_callback_set(void (*func) (void *data), const void *data)
cb_func = func;
cb_data = (void *)data;
}
static Eina_Bool
_module_init(void)
{
return EINA_TRUE;
}
static void
_module_shutdown(void)
{
}
EINA_MODULE_INIT(_module_init);
EINA_MODULE_SHUTDOWN(_module_shutdown);

View File

@ -382,3 +382,17 @@ elm_modapi_shutdown(void *m EINA_UNUSED)
{
return 1; // succeed always
}
static Eina_Bool
_module_init(void)
{
return EINA_TRUE;
}
static void
_module_shutdown(void)
{
}
EINA_MODULE_INIT(_module_init);
EINA_MODULE_SHUTDOWN(_module_shutdown);

View File

@ -35,3 +35,17 @@ obj_longpress(Evas_Object *obj)
{
printf("longpress: %p\n", obj);
}
static Eina_Bool
_module_init(void)
{
return EINA_TRUE;
}
static void
_module_shutdown(void)
{
}
EINA_MODULE_INIT(_module_init);
EINA_MODULE_SHUTDOWN(_module_shutdown);