aboutsummaryrefslogtreecommitdiff
path: root/src/linked_list.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/linked_list.h')
-rw-r--r--src/linked_list.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/linked_list.h b/src/linked_list.h
index 0da0c25..2a0939f 100644
--- a/src/linked_list.h
+++ b/src/linked_list.h
@@ -2,8 +2,7 @@
* @file linked_list.h
* @brief Doubly-linked list implementation.
* @details This module provides a generic doubly-linked list data structure
- * that can store pointers to any data type. The list maintains both
- * head and tail pointers for efficient operations at both ends.
+ * that can store pointers to any datatype.
*/
#ifndef LINKED_LIST_H
@@ -69,8 +68,7 @@ struct LinkedListNode {
/**
* @brief Generic pointer to the node's data.
* @details The caller is responsible for managing the memory
- * pointed to by this pointer. This pointer can store any
- * data type (int*, char*, struct*, etc.).
+ * pointed to by this pointer.
*/
void *data;
};
@@ -89,8 +87,7 @@ LinkedList *linked_list_new();
/**
* @brief Deallocates the given linked list and all its nodes.
*
- * @param ll Pointer to the linked list to delete. If NULL, this function
- * does nothing.
+ * @param ll Pointer to the linked list to delete. If NULL.
*
* @note This function deallocates only the list structure and nodes, not
* the data they point to. The caller retains ownership of the data.
@@ -117,9 +114,7 @@ LinkedListNode *linked_list_append(LinkedList *ll, void *elem);
*
* @param ll Pointer to the linked list.
*
- * @return The data pointer of the removed first element.
- *
- * @pre The list must not be empty (ll->size != 0).
+ * @return The data pointer of the removed first element, or NULL if empty.
*/
void *linked_list_popfront(LinkedList *ll);