ObjFW  Diff

Differences From Artifact [e2872c89cd]:

To Artifact [8973979249]:


32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
@synthesize lastListObject = _lastListObject;

+ (instancetype)list
{
	return [[[self alloc] init] autorelease];
}

- initWithSerialization: (OFXMLElement *)element
{
	self = [self init];

	@try {
		void *pool = objc_autoreleasePoolPush();

		if (![[element name] isEqual: [self className]] ||







|







32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
@synthesize lastListObject = _lastListObject;

+ (instancetype)list
{
	return [[[self alloc] init] autorelease];
}

- (instancetype)initWithSerialization: (OFXMLElement *)element
{
	self = [self init];

	@try {
		void *pool = objc_autoreleasePoolPush();

		if (![[element name] isEqual: [self className]] ||
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
		[iter->object release];
		[self freeMemory: iter];
	}

	_firstListObject = _lastListObject = NULL;
}

- copy
{
	OFList *copy = [[[self class] alloc] init];
	of_list_object_t *listObject, *previous;

	listObject = NULL;
	previous = NULL;








|







264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
		[iter->object release];
		[self freeMemory: iter];
	}

	_firstListObject = _lastListObject = NULL;
}

- (id)copy
{
	OFList *copy = [[[self class] alloc] init];
	of_list_object_t *listObject, *previous;

	listObject = NULL;
	previous = NULL;

400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
	return [[[OFListEnumerator alloc]
		initWithList: self
	    mutationsPointer: &_mutations] autorelease];
}
@end

@implementation OFListEnumerator
-     initWithList: (OFList *)list
  mutationsPointer: (unsigned long *)mutationsPtr
{
	self = [super init];

	_list = [list retain];
	_current = [list firstListObject];
	_mutations = *mutationsPtr;
	_mutationsPtr = mutationsPtr;







|
|







400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
	return [[[OFListEnumerator alloc]
		initWithList: self
	    mutationsPointer: &_mutations] autorelease];
}
@end

@implementation OFListEnumerator
- (instancetype)initWithList: (OFList *)list
	    mutationsPointer: (unsigned long *)mutationsPtr
{
	self = [super init];

	_list = [list retain];
	_current = [list firstListObject];
	_mutations = *mutationsPtr;
	_mutationsPtr = mutationsPtr;