Functions | |
void * | evas_list_data (Evas_List *list) |
Get the list node data member. | |
int | evas_list_count (Evas_List *list) |
Get the count of the number of items in a list. | |
int | evas_list_alloc_error (void) |
Return the memory allocation failure flag after any operation needin allocation. |
|
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); } |
|
Get the count of the number of items in a 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)); |
|
Get the list node data member.
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)); } |