ecore_init/shutdown: Proper refcounting for wrappers
Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
This commit is contained in:
parent
9b0fb72d66
commit
5aa5fbec06
|
@ -219,10 +219,12 @@ tsuite_shot_do(char *name, Evas *e)
|
||||||
EAPI int
|
EAPI int
|
||||||
ecore_init(void)
|
ecore_init(void)
|
||||||
{
|
{
|
||||||
|
int ret;
|
||||||
int (*_ecore_init)(void) =
|
int (*_ecore_init)(void) =
|
||||||
dlsym(RTLD_NEXT, "ecore_init");
|
dlsym(RTLD_NEXT, "ecore_init");
|
||||||
|
|
||||||
if (!_hook_setting)
|
ret = _ecore_init();
|
||||||
|
if ((ret == 1) && (!_hook_setting))
|
||||||
{
|
{
|
||||||
const char *tmp;
|
const char *tmp;
|
||||||
_hook_setting = calloc(1, sizeof(evas_hook_setting));
|
_hook_setting = calloc(1, sizeof(evas_hook_setting));
|
||||||
|
@ -243,15 +245,19 @@ ecore_init(void)
|
||||||
tsuite_evas_hook_init();
|
tsuite_evas_hook_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
return _ecore_init();
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI int
|
EAPI int
|
||||||
ecore_shutdown(void)
|
ecore_shutdown(void)
|
||||||
{
|
{
|
||||||
|
int ret;
|
||||||
int (*_ecore_shutdown)(void) =
|
int (*_ecore_shutdown)(void) =
|
||||||
dlsym(RTLD_NEXT, "ecore_shutdown");
|
dlsym(RTLD_NEXT, "ecore_shutdown");
|
||||||
|
|
||||||
|
ret = _ecore_shutdown();
|
||||||
|
if (ret == 0)
|
||||||
|
{
|
||||||
if (_hook_setting)
|
if (_hook_setting)
|
||||||
{
|
{
|
||||||
if (vr_list && _hook_setting->recording)
|
if (vr_list && _hook_setting->recording)
|
||||||
|
@ -269,7 +275,8 @@ ecore_shutdown(void)
|
||||||
evas_list = eina_list_free(evas_list);
|
evas_list = eina_list_free(evas_list);
|
||||||
|
|
||||||
memset(&ts, 0, sizeof(Tsuite_Data));
|
memset(&ts, 0, sizeof(Tsuite_Data));
|
||||||
return _ecore_shutdown();
|
}
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Evas_Object *
|
EAPI Evas_Object *
|
||||||
|
|
Loading…
Reference in New Issue