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,33 +245,38 @@ 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");
|
||||||
|
|
||||||
if (_hook_setting)
|
ret = _ecore_shutdown();
|
||||||
|
if (ret == 0)
|
||||||
{
|
{
|
||||||
if (vr_list && _hook_setting->recording)
|
if (_hook_setting)
|
||||||
write_events(_hook_setting->file_name, vr_list);
|
{
|
||||||
|
if (vr_list && _hook_setting->recording)
|
||||||
|
write_events(_hook_setting->file_name, vr_list);
|
||||||
|
|
||||||
tsuite_evas_hook_reset();
|
tsuite_evas_hook_reset();
|
||||||
|
|
||||||
free(_hook_setting);
|
free(_hook_setting);
|
||||||
_hook_setting = NULL;
|
_hook_setting = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ts.td)
|
||||||
|
free(ts.td);
|
||||||
|
|
||||||
|
evas_list = eina_list_free(evas_list);
|
||||||
|
|
||||||
|
memset(&ts, 0, sizeof(Tsuite_Data));
|
||||||
}
|
}
|
||||||
|
return ret;
|
||||||
if (ts.td)
|
|
||||||
free(ts.td);
|
|
||||||
|
|
||||||
evas_list = eina_list_free(evas_list);
|
|
||||||
|
|
||||||
memset(&ts, 0, sizeof(Tsuite_Data));
|
|
||||||
return _ecore_shutdown();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Evas_Object *
|
EAPI Evas_Object *
|
||||||
|
|
Loading…
Reference in New Issue