Enlightenment CVS committal Author : cedric Project : e17 Module : proto/eina
Dir : e17/proto/eina/src/include Modified Files: eina_array.h Log Message: Fix iterator. =================================================================== RCS file: /cvs/e/e17/proto/eina/src/include/eina_array.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- eina_array.h 1 Aug 2008 12:26:35 -0000 1.2 +++ eina_array.h 1 Aug 2008 14:23:11 -0000 1.3 @@ -23,7 +23,7 @@ EAPI void eina_array_flush (Eina_Array *array); EAPI void eina_array_remove (Eina_Array *array, Eina_Bool (*keep)(void *data, void *gdata), void *gdata); -#define EINA_ARRAY_ITER_NEXT(array, index, item) for ((index) = 0, (item) = _eina_array_get((array), (index)); (index) < (array)->count; ++(index), (item) = _eina_array_get((array), (index))) +#define EINA_ARRAY_ITER_NEXT(array, index, item) for ((index) = 0, (item) = ((array) && (array)->count > 0) ? _eina_array_get((array), (index)) : NULL; (index) < (array)->count; ++(index), (item) = _eina_array_get((array), (index))) #include "eina_inline_array.x" ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs