diff -r 0a71ac9547fd -r d0d95740071b src/cx/linked_list.h --- a/src/cx/linked_list.h Thu Feb 23 22:27:41 2023 +0100 +++ b/src/cx/linked_list.h Thu Feb 23 22:43:13 2023 +0100 @@ -54,9 +54,6 @@ /** * Allocates a linked list for storing elements with \p item_size bytes each. * - * @remark Elements added to the list are copied, therefore a possible destructor - * MUST NOT free the memory pointed to by its argument. - * * @param allocator the allocator for allocating the list nodes * @param comparator the comparator for the elements * @param item_size the size of each element in bytes @@ -69,6 +66,18 @@ ) __attribute__((__nonnull__)); /** + * Allocates a linked list for storing elements with \p item_size bytes each. + * + * The list will use cxDefaultAllocator and no comparator function. If you want + * to call functions that need a comparator, you must either set one immediately + * after list creation or use cxLinkedListCreate(). + * + * @param item_size the size of each element in bytes + * @return the created list + */ +CxList *cxLinkedListCreateSimple(size_t item_size); + +/** * Finds the node at a certain index. * * This function can be used to start at an arbitrary position within the list.