Added a replace function to linked_list_t.
This commit is contained in:
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user