aboutsummaryrefslogtreecommitdiffstats
path: root/Source/charon/linked_list.c
diff options
context:
space:
mode:
authorJan Hutter <jhutter@hsr.ch>2005-11-03 13:32:40 +0000
committerJan Hutter <jhutter@hsr.ch>2005-11-03 13:32:40 +0000
commitadca27eb76663402473a69fc3944919495f99fd6 (patch)
treebe5622e3678259af82c0c03421bddb7cf611f27c /Source/charon/linked_list.c
parentee4e57ac2a4aaca67836189b7b9a2ad746051b24 (diff)
downloadstrongswan-adca27eb76663402473a69fc3944919495f99fd6.tar.bz2
strongswan-adca27eb76663402473a69fc3944919495f99fd6.tar.xz
- job queue implemented but not tested
Diffstat (limited to 'Source/charon/linked_list.c')
-rw-r--r--Source/charon/linked_list.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/Source/charon/linked_list.c b/Source/charon/linked_list.c
index 50aa4bd07..0a84545ca 100644
--- a/Source/charon/linked_list.c
+++ b/Source/charon/linked_list.c
@@ -31,18 +31,21 @@
/**
* @brief implements function destroy of linked_list_item_t
*/
-static status_t destroy_linked_list_element(linked_list_element_t *linked_list_element)
+static status_t linked_list_element_destroy(linked_list_element_t *linked_list_element)
{
linked_list_element_t * this = linked_list_element;
pfree(this);
return SUCCESS;
}
+/*
+ * Creates a linked list (documented in header-file)
+ */
linked_list_element_t *linked_list_element_create(void *value)
{
linked_list_element_t *this = alloc_thing(linked_list_element_t, "linked_list_element_t");
- this->destroy = destroy_linked_list_element;
+ this->destroy = linked_list_element_destroy;
this->previous=NULL;
this->next=NULL;
@@ -232,7 +235,7 @@ static status_t get_last(linked_list_t *linked_list, void **item)
/**
* @brief implements function destroy of linked_list_t
*/
-static status_t destroy_linked_list(linked_list_t *linked_list)
+static status_t linked_list_destroy(linked_list_t *linked_list)
{
linked_list_t *this = linked_list;
@@ -250,7 +253,10 @@ static status_t destroy_linked_list(linked_list_t *linked_list)
return SUCCESS;
}
-
+/*
+ *
+ * Documented in header
+ */
linked_list_t *linked_list_create()
{
linked_list_t *this = alloc_thing(linked_list_t, "linked_list_t");
@@ -261,7 +267,7 @@ linked_list_t *linked_list_create()
this->insert_last = insert_last;
this->remove_first = remove_first;
this->remove_last = remove_last;
- this->destroy = destroy_linked_list;
+ this->destroy = linked_list_destroy;
this->count = 0;
this->first = NULL;