Added a replace function to linked_list_t.

This commit is contained in:
Tobias Brunner
2011-07-06 09:43:45 +02:00
parent fbf014b0c1
commit 0b6ff2a9fe
2 changed files with 24 additions and 0 deletions
+10
View File
@@ -125,6 +125,16 @@ struct linked_list_t {
void (*insert_after)(linked_list_t *this, enumerator_t *enumerator,
void *item);
/**
* Replaces the item the enumerator currently points to with the given item.
*
* @param enumerator enumerator with position
* @param item item value to replace current item with
* @return current item or NULL if the enumerator is at an
* invalid position
*/
void *(*replace)(linked_list_t *this, enumerator_t *enumerator, void *item);
/**
* Remove an item from the list where the enumerator points to.
*