lista_dinamica.h (545B)
1 #ifndef DYNAMIC_LIST_H 2 #define DYNAMIC_LIST_H 3 4 typedef struct DYNAMIC_LIST_STRUCT{ 5 size_t item_size; 6 size_t length; 7 void** items; 8 } dynamic_list_T; 9 10 dynamic_list_T* init_dynamic_list(size_t item_size); 11 void dynamic_list_append(dynamic_list_T* dynamic_list, void* item); 12 int dynamic_list_find(dynamic_list_T* dynamic_list, void* item, int (*equals_method)(void* x, void* y)); 13 int dynamic_list_delete(dynamic_list_T* dynamic_list, int index); 14 void dynamic_list_free(dynamic_list_T* dynamic_list, void(*free_method)(void* x)); 15 16 #endif 17