Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas
Dir : e17/libs/evas/src/lib/data Modified Files: Makefile.am evas_array.c Added Files: evas_inline_array.x Log Message: fix build. build properly. =================================================================== RCS file: /cvs/e/e17/libs/evas/src/lib/data/Makefile.am,v retrieving revision 1.13 retrieving revision 1.14 diff -u -3 -r1.13 -r1.14 --- Makefile.am 10 Jul 2008 16:38:54 -0000 1.13 +++ Makefile.am 18 Jul 2008 14:17:05 -0000 1.14 @@ -11,6 +11,7 @@ noinst_LTLIBRARIES = libevas_data.la libevas_data_la_SOURCES = \ +evas_array_inline.x \ evas_hash.c \ evas_list.c \ evas_array.c \ =================================================================== RCS file: /cvs/e/e17/libs/evas/src/lib/data/evas_array.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- evas_array.c 18 Jul 2008 09:38:02 -0000 1.5 +++ evas_array.c 18 Jul 2008 14:17:05 -0000 1.6 @@ -9,48 +9,7 @@ #include <stdlib.h> #include "Evas_Data.h" - - -#ifdef __GNUC__ -# define UNLIKELY(x) __builtin_expect(!!(x), 0) -#else -# define UNLIKELY(x) (x) -#endif - - -static Evas_Bool _evas_array_grow(Evas_Array *array); - -static inline void -_evas_array_append(Evas_Array *array, void *data) -{ - if (UNLIKELY((array->count + array->step) > array->total)) - if (!_evas_array_grow(array)) return ; - - array->data[array->count++] = data; -} - -static inline void* -_evas_array_get(Evas_Array *array, unsigned int index) -{ - return array->data[index]; -} - - -static Evas_Bool -_evas_array_grow(Evas_Array *array) -{ - void **tmp; - size_t total; - - total = array->total + array->step; - tmp = realloc(array->data, sizeof (void*) * total); - if (!tmp) return 0; - - array->total = total; - array->data = tmp; - - return 1; -} +#include "evas_inline_array.x" EAPI void evas_array_append(Evas_Array *array, void *data) @@ -58,7 +17,7 @@ _evas_array_append(array, data); } -EAPI void* +EAPI void * evas_array_get(Evas_Array *array, unsigned int index) { return _evas_array_get(array, index); @@ -86,7 +45,7 @@ array->data = NULL; } -EAPI Evas_Array* +EAPI Evas_Array * evas_array_new(unsigned int step) { Evas_Array *array; ------------------------------------------------------------------------- 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