diff options
Diffstat (limited to 'src/list.h')
-rw-r--r-- | src/list.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -69,10 +69,21 @@ unsigned char list_set_length(List *ls, NUM len); The number of elements of the array will be stored in *NUM. */ void *list_to_array(List *ls, NUM element_bytes, NUM *num); +/* Create a list from an array. + + The array will be re-used, so it will be destroyed when the list is + destroyed. */ +List *array_to_list(void ** array, NUM size); + + /* destroy the list: If ALL_FREE_P is 1, this frees every void pointers contained in the list; if it is 2, this frees the first pointer. In any case, the list is de-allocated. */ void destroy_list(List *ls, unsigned char all_free_p); +void destroy_list_free_all(void *ls); +void destroy_list_free_first(void *ls); +void destroy_list_no_free(void *ls); + #endif |