summaryrefslogtreecommitdiff
path: root/src/list.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/list.h')
-rw-r--r--src/list.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/list.h b/src/list.h
index b710aa2..ff401f4 100644
--- a/src/list.h
+++ b/src/list.h
@@ -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