- linked_list, event_queue, send_queue and job_queue returns now

count directly
This commit is contained in:
Jan Hutter
2005-11-10 08:44:17 +00:00
parent ed7634e696
commit 1061c878a9
16 changed files with 95 additions and 132 deletions
+3 -8
View File
@@ -240,14 +240,9 @@ static status_t iterator_destroy(private_linked_list_iterator_t *this)
/**
* @brief implements function get_count of linked_list_t
*/
static status_t get_count(private_linked_list_t *this, int *count)
static int get_count(private_linked_list_t *this)
{
if (this == NULL)
{
return FAILED;
}
*count = this->count;
return SUCCESS;
return this->count;
}
@@ -685,7 +680,7 @@ linked_list_t *linked_list_create()
{
private_linked_list_t *this = allocator_alloc_thing(private_linked_list_t);
this->public.get_count = (status_t (*) (linked_list_t *linked_list, int *count)) get_count;
this->public.get_count = (int (*) (linked_list_t *linked_list)) get_count;
this->public.create_iterator = (status_t (*) (linked_list_t *linked_list, linked_list_iterator_t **iterator,bool forward)) create_iterator;
this->public.get_first = (status_t (*) (linked_list_t *linked_list, void **item)) get_first;
this->public.get_last = (status_t (*) (linked_list_t *linked_list, void **item)) get_last;