Adding EINA_INLIST_CONTAINER_GET to the examples when freeing the list.

Author:    Guilherme Iscaro <iscaro@profusion.mobi>

SVN revision: 71850
This commit is contained in:
Jonas M. Gastal 2012-06-08 13:22:09 +00:00
parent 4efd677ac8
commit 5590d14689
3 changed files with 6 additions and 3 deletions

View File

@ -86,7 +86,8 @@ main(void)
while (list)
{
Eina_Inlist *aux = list;
struct my_struct *aux = EINA_INLIST_CONTAINER_GET(list,
struct my_struct);
list = eina_inlist_remove(list, list);
free(aux);
}

View File

@ -54,7 +54,8 @@ main(void)
while (inlist)
{
Eina_Inlist *aux = inlist;
struct my_struct *aux = EINA_INLIST_CONTAINER_GET(inlist,
struct my_struct);
inlist = eina_inlist_remove(inlist, inlist);
free(aux);
}

View File

@ -63,7 +63,8 @@ main(void)
while (list)
{
Eina_Inlist *aux = list;
struct my_struct *aux = EINA_INLIST_CONTAINER_GET(list,
struct my_struct);
list = eina_inlist_remove(list, list);
free(aux);
}