ObjFW  Diff

Differences From Artifact [00cf253ec8]:

To Artifact [4c13c1c2d3]:


54
55
56
57
58
59
60
61

62
63
64
65
66
67
68

69
70
71
72
73
74
75
76
54
55
56
57
58
59
60

61

62
63
64
65
66

67

68
69
70
71
72
73
74







-
+
-





-
+
-







	ret = [[OFMutableMapTableSet alloc] initWithObject: firstObject
						 arguments: arguments];
	va_end(arguments);

	return ret;
}

- (instancetype)initWithObjects: (id const *)objects
- (instancetype)initWithObjects: (id const *)objects count: (size_t)count
			  count: (size_t)count
{
	return (id)[[OFMutableMapTableSet alloc] initWithObjects: objects
							   count: count];
}

- (instancetype)initWithObject: (id)firstObject
- (instancetype)initWithObject: (id)firstObject arguments: (va_list)arguments
		     arguments: (va_list)arguments
{
	return (id)[[OFMutableMapTableSet alloc] initWithObject: firstObject
						      arguments: arguments];
}

- (instancetype)initWithSerialization: (OFXMLElement *)element
{
166
167
168
169
170
171
172
173

174
175
176
177
178
179
180
181
182
183
184
185

186
187

188
189
190
191
192
193
194
164
165
166
167
168
169
170

171
172
173
174
175
176
177
178
179
180
181
182

183
184

185
186
187
188
189
190
191
192







-
+











-
+

-
+








- (void)intersectSet: (OFSet *)set
{
	void *pool = objc_autoreleasePoolPush();
	size_t count = self.count;
	id *cArray;

	cArray = of_alloc(count, sizeof(id));
	cArray = OFAllocMemory(count, sizeof(id));
	@try {
		size_t i;

		i = 0;
		for (id object in self) {
			assert(i < count);
			cArray[i++] = object;
		}

		for (i = 0; i < count; i++)
			if (![set containsObject: cArray[i]])
			      [self removeObject: cArray[i]];
				[self removeObject: cArray[i]];
	} @finally {
		free(cArray);
		OFFreeMemory(cArray);
	}

	objc_autoreleasePoolPop(pool);
}

- (void)unionSet: (OFSet *)set
{