From: Enlightenment C. <no...@cv...> - 2008-07-30 16:34:56
|
Enlightenment CVS committal Author : cedric Project : e17 Module : proto/eina Dir : e17/proto/eina/src/lib Modified Files: Makefile.am eina_lalloc.c eina_value.c Added Files: eina_array.c Log Message: Add array and cleanup lalloc namespace. =================================================================== RCS file: /cvs/e/e17/proto/eina/src/lib/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- Makefile.am 30 Jul 2008 13:05:13 -0000 1.2 +++ Makefile.am 30 Jul 2008 16:34:54 -0000 1.3 @@ -15,6 +15,7 @@ eina_list.c \ eina_module.c \ eina_value.c \ +eina_array.c \ eina_stringshare.c libeina_la_LIBADD = -ldl =================================================================== RCS file: /cvs/e/e17/proto/eina/src/lib/eina_lalloc.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- eina_lalloc.c 30 Jul 2008 13:35:49 -0000 1.2 +++ eina_lalloc.c 30 Jul 2008 16:34:54 -0000 1.3 @@ -1,25 +1,25 @@ #include "eina_lalloc.h" #include "eina_private.h" -struct _Eina_Array +struct _Eina_Lalloc { void *data; int num_allocated; int num_elements; int acc; - Eina_Array_Alloc alloc_cb; - Eina_Array_Free free_cb; + Eina_Lalloc_Alloc alloc_cb; + Eina_Lalloc_Free free_cb; }; /** * To be documented * FIXME: To be fixed */ -EAPI Eina_Array * eina_array_new(void *data, Eina_Array_Alloc alloc_cb, Eina_Array_Free free_cb, int num_init) +EAPI Eina_Lalloc * eina_lalloc_new(void *data, Eina_Lalloc_Alloc alloc_cb, Eina_Lalloc_Free free_cb, int num_init) { - Eina_Array *a; + Eina_Lalloc *a; - a = calloc(1, sizeof(Eina_Array)); + a = calloc(1, sizeof(Eina_Lalloc)); a->data = data; a->alloc_cb = alloc_cb; a->free_cb = free_cb; @@ -35,7 +35,7 @@ * To be documented * FIXME: To be fixed */ -EAPI void eina_array_element_add(Eina_Array *a) +EAPI void eina_lalloc_element_add(Eina_Lalloc *a) { if (a->num_elements == a->num_allocated) { @@ -50,7 +50,7 @@ * To be documented * FIXME: To be fixed */ -EAPI void eina_array_elements_add(Eina_Array *a, int num) +EAPI void eina_lalloc_elements_add(Eina_Lalloc *a, int num) { int tmp; @@ -71,7 +71,7 @@ * To be documented * FIXME: To be fixed */ -EAPI void eina_array_free(Eina_Array *a) +EAPI void eina_lalloc_free(Eina_Lalloc *a) { a->free_cb(a->data); free(a); =================================================================== RCS file: /cvs/e/e17/proto/eina/src/lib/eina_value.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- eina_value.c 30 Jul 2008 12:46:54 -0000 1.1 +++ eina_value.c 30 Jul 2008 16:34:54 -0000 1.2 @@ -24,7 +24,7 @@ */ -#include "Eina.h" +#include "eina_types.h" #include "eina_private.h" EAPI const unsigned int eina_prime_table[] = |