Expand description
Linked list — public xmlList API (§85 Phase 1).
Implements libxml2’s linked list.
§UPSTREAM-PARITY
The linked list supports:
- Create/delete with custom deallocator
- Push front/back, pop front/back
- Insert/append at arbitrary positions
- Search with custom comparator
- Walk with callback
- Remove first/last/all matching entries
- Clear
- Empty/front/back/size queries
- Sort, reverse, reverse splice, merge
§Phase 1 status
Complete — all list operations are implemented.
Structs§
- List
- The linked list struct.
Functions§
- list_
append ⚠ - Append data to the end of the list (alias for push_back).
- list_
back - Get the data at the back of the list.
- list_
clear ⚠ - Clear the list (remove all elements).
- list_
create - Create a new linked list.
- list_
delete ⚠ - Delete a linked list and all its nodes.
- list_
empty - Check if the list is empty.
- list_
front - Get the data at the front of the list.
- list_
insert ⚠ - Insert data into the sorted position.
- list_
merge ⚠ - Merge two sorted lists into one.
- list_
pop_ ⚠back - Pop data from the back of the list.
- list_
pop_ ⚠front - Pop data from the front of the list.
- list_
push_ ⚠back - Push data to the back of the list.
- list_
push_ ⚠front - Push data to the front of the list.
- list_
remove_ ⚠all - Remove all matching elements.
- list_
remove_ ⚠first - Remove the first matching element.
- list_
remove_ ⚠last - Remove the last matching element.
- list_
reverse ⚠ - Reverse the list in-place.
- list_
reverse_ ⚠splice - Reverse splice: move all elements from
l2to the front ofl1in reverse order. - list_
search ⚠ - Search the list for data matching the given key.
- list_
size - Get the number of elements in the list.
- list_
sort ⚠ - Sort the list in-place using the comparator.
- list_
walk ⚠ - Walk the list, calling the walker function for each element.
Type Aliases§
- xmlList
Data Compare - Data comparator function. Returns 0 if equal, non-zero if different.
- xmlList
Deallocator - Deallocator function for list data.
- xmlList
Walker - Walker function for xmlListWalk.