ObjFW  Diff

Differences From Artifact [2880b7d607]:

To Artifact [e5cb38f069]:


23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
+ (instancetype)pairWithFirstObject: (id)firstObject
		       secondObject: (id)secondObject
{
	return [[[self alloc] initWithFirstObject: firstObject
				     secondObject: secondObject] autorelease];
}

- initWithFirstObject: (id)firstObject
	 secondObject: (id)secondObject
{
	self = [super init];

	@try {
		_firstObject = [firstObject retain];
		_secondObject = [secondObject retain];
	} @catch (id e) {







|
|







23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
+ (instancetype)pairWithFirstObject: (id)firstObject
		       secondObject: (id)secondObject
{
	return [[[self alloc] initWithFirstObject: firstObject
				     secondObject: secondObject] autorelease];
}

- (instancetype)initWithFirstObject: (id)firstObject
		       secondObject: (id)secondObject
{
	self = [super init];

	@try {
		_firstObject = [firstObject retain];
		_secondObject = [secondObject retain];
	} @catch (id e) {
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
	OF_HASH_ADD_HASH(hash, [_secondObject hash]);

	OF_HASH_FINALIZE(hash);

	return hash;
}

- copy
{
	return [self retain];
}

- mutableCopy
{
	return [[OFMutablePair alloc] initWithFirstObject: _firstObject
					     secondObject: _secondObject];
}

- (OFString *)description
{
	return [OFString stringWithFormat: @"<<%@, %@>>",
					   _firstObject, _secondObject];
}
@end







|




|











91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
	OF_HASH_ADD_HASH(hash, [_secondObject hash]);

	OF_HASH_FINALIZE(hash);

	return hash;
}

- (id)copy
{
	return [self retain];
}

- (id)mutableCopy
{
	return [[OFMutablePair alloc] initWithFirstObject: _firstObject
					     secondObject: _secondObject];
}

- (OFString *)description
{
	return [OFString stringWithFormat: @"<<%@, %@>>",
					   _firstObject, _secondObject];
}
@end