| 11 | #include <assert.h> |
| 12 | |
| 13 | void DoublyLinkedListInitialize(DoublyLinkedList *list, |
| 14 | NodeMemoryAllocator allocator, |
| 15 | NodeMemoryDeallocator deallocator) { |
| 16 | list->first = NULL; |
| 17 | list->last = NULL; |
| 18 | list->allocator = allocator; |
| 19 | list->deallocator = deallocator; |
| 20 | } |
| 21 | |
| 22 | void DoublyLinkedListDestroy(DoublyLinkedList *list) { |
| 23 | DoublyLinkedListNode *iterator = list->first; |