Functions | |
EAPI void * | evas_list_data (Evas_List *list) |
Get the list node data member. | |
EAPI int | evas_list_count (Evas_List *list) |
Get the count of the number of items in a list. | |
EAPI int | evas_list_alloc_error (void) |
Return the memory allocation failure flag after any operation needin allocation. |
EAPI int evas_list_alloc_error | ( | void | ) |
Return the memory allocation failure flag after any operation needin allocation.
Example:
Evas_List *list = NULL; extern void *my_data; list = evas_list_append(list, my_data); if (evas_list_alloc_error()) { fprintf(stderr, "ERROR: Memory is low. List allocation failed.\n"); exit(-1); }
EAPI int evas_list_count | ( | Evas_List * | list | ) |
Get the count of the number of items in a list.
list | The list whose count to return |
list
list
. If the list is empty (NULL), 0 is returned.NB: This is an order-1 operation and takes the same tiem regardless of the length of the list.
Example:
extern Evas_List *list; printf("The list has %i members\n", evas_list_count(list));
EAPI void* evas_list_data | ( | Evas_List * | list | ) |
Get the list node data member.
list | The list node to get the data member of |
list
list
. It is equivalent to list->data.Example:
extern Evas_List *list; Evas_List *l; printf("The list:\n"); for (l = list; l; l = evas_list_next(l)) { printf("%p\n", evas_list_data(l)); }