add e_comp_cfdata_match_free()

SVN revision: 82704
This commit is contained in:
Mike Blumenkrantz 2013-01-12 15:46:01 +00:00
parent f15d34dcac
commit f965a163bf
2 changed files with 14 additions and 17 deletions

View File

@ -183,20 +183,16 @@ e_comp_cfdata_config_new(void)
return cfg; return cfg;
} }
static void EAPI void
_match_list_free(Eina_List *list) e_comp_cfdata_match_free(E_Comp_Match *m)
{ {
E_Comp_Match *m; if (!m) return;
eina_stringshare_del(m->title);
EINA_LIST_FREE(list, m) eina_stringshare_del(m->name);
{ eina_stringshare_del(m->clas);
if (m->title) eina_stringshare_del(m->title); eina_stringshare_del(m->role);
if (m->name) eina_stringshare_del(m->name); eina_stringshare_del(m->shadow_style);
if (m->clas) eina_stringshare_del(m->clas); free(m);
if (m->role) eina_stringshare_del(m->role);
if (m->shadow_style) eina_stringshare_del(m->shadow_style);
free(m);
}
} }
EAPI void EAPI void
@ -205,10 +201,10 @@ e_comp_cfdata_config_free(E_Comp_Config *cfg)
if (!cfg) return; if (!cfg) return;
eina_stringshare_del(cfg->shadow_style); eina_stringshare_del(cfg->shadow_style);
_match_list_free(cfg->match.popups); E_FREE_LIST(cfg->match.popups, e_comp_cfdata_match_free);
_match_list_free(cfg->match.borders); E_FREE_LIST(cfg->match.borders, e_comp_cfdata_match_free);
_match_list_free(cfg->match.overrides); E_FREE_LIST(cfg->match.overrides, e_comp_cfdata_match_free);
_match_list_free(cfg->match.menus); E_FREE_LIST(cfg->match.menus, e_comp_cfdata_match_free);
free(cfg); free(cfg);
} }

View File

@ -73,6 +73,7 @@ struct _E_Comp_Match
EAPI void e_comp_cfdata_edd_init(E_Config_DD **conf_edd, E_Config_DD **match_edd); EAPI void e_comp_cfdata_edd_init(E_Config_DD **conf_edd, E_Config_DD **match_edd);
EAPI E_Comp_Config *e_comp_cfdata_config_new(void); EAPI E_Comp_Config *e_comp_cfdata_config_new(void);
EAPI void e_comp_cfdata_config_free(E_Comp_Config *cfg); EAPI void e_comp_cfdata_config_free(E_Comp_Config *cfg);
EAPI void e_comp_cfdata_match_free(E_Comp_Match *m);
#endif #endif
#endif #endif