forked from enlightenment/efl
45a791dfa1
EINA_INLIST_FOREACH_SAFE is very broken and it only works by luck, depending on the __inlist field being the first one in the struct. Until now. This commit makes the following snippet to work: #include <Eina.h> typedef struct _data { char *name; EINA_INLIST; } data; int main() { Eina_Inlist *inlist = NULL, *inlist_safe; data *reg, *d; reg = malloc(sizeof(data)); inlist = eina_inlist_append(inlist, EINA_INLIST_GET(reg)); EINA_INLIST_FOREACH_SAFE(inlist, inlist_safe, d) { printf("%p\n", d); inlist = eina_inlist_remove(inlist, EINA_INLIST_GET(d)); free(d); } return 0; } Patch-by: José Roberto de Souza <zehortigoza@profusion.mobi> SVN revision: 76150 |
||
---|---|---|
.. | ||
ecore | ||
edje | ||
eet | ||
eeze | ||
efreet | ||
eina | ||
eio | ||
embryo | ||
emotion | ||
eobj | ||
ephysics | ||
escape | ||
ethumb | ||
evas | ||
evil |