efl/legacy
Lucas De Marchi 45a791dfa1 eina: Fix EINA_INLIST_FOREACH_SAFE macro
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
2012-09-04 22:20:25 +00:00
..
ecore add NEWS about adding enum 2012-09-04 07:42:55 +00:00
edje edje_edit: Closing the opened eet_file 2012-09-04 21:43:32 +00:00
eet update header #defined versions to 1.8 to make sure new apis are used 2012-09-03 09:55:34 +00:00
eeze update header #defined versions to 1.8 to make sure new apis are used 2012-09-03 09:55:34 +00:00
efreet update header #defined versions to 1.8 to make sure new apis are used 2012-09-03 09:55:34 +00:00
eina eina: Fix EINA_INLIST_FOREACH_SAFE macro 2012-09-04 22:20:25 +00:00
eio update header #defined versions to 1.8 to make sure new apis are used 2012-09-03 09:55:34 +00:00
embryo update header #defined versions to 1.8 to make sure new apis are used 2012-09-03 09:55:34 +00:00
emotion update header #defined versions to 1.8 to make sure new apis are used 2012-09-03 09:55:34 +00:00
eobj Eo: autogen.sh - dos->unix. 2012-09-04 10:48:28 +00:00
ephysics ephysics: missing include in dist 2012-08-27 09:38:07 +00:00
escape added short description in the missing README contents 2012-04-07 01:25:36 +00:00
ethumb update header #defined versions to 1.8 to make sure new apis are used 2012-09-03 09:55:34 +00:00
evas Formatting 2012-09-04 20:38:09 +00:00
evil ChangeLog: back in time. 2012-08-30 11:26:00 +00:00