@@ -7,10 +7,12 @@ * This file is part of libobjfw. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE included in * the packaging of this file. */ +#import "config.h" + #import "OFList.h" @implementation OFList - init { @@ -31,17 +33,17 @@ } return [super free]; } -- freeWithData +- freeIncludingData { OFListObject *iter, *next; for (iter = first; iter != nil; iter = next) { next = [iter next]; - [iter freeWithData]; + [iter freeIncludingData]; } first = last = nil; return [super free]; } @@ -69,8 +71,8 @@ last = ptr; } - (void)addNew: (void*)ptr { - return [self add: [OFListObject new: ptr]]; + return [self add: [OFListObject newWithData: ptr]]; } @end