ObjFW  Diff

Differences From Artifact [70a48a8714]:

To Artifact [f37fb0932b]:


198
199
200
201
202
203
204






















205
206
207
208
209
210
211
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233







+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+








	for (i = 0; i < len; i++)
		if (![objs[i] isEqual: objs2[i]])
			return NO;

	return YES;
}

- (uint32_t)hash
{
	OFObject **carray = [array cArray];
	size_t i, count = [array count];
	uint32_t hash;

	OF_HASH_INIT(hash);

	for (i = 0; i < count; i++) {
		uint32_t h = [carray[i] hash];

		OF_HASH_ADD(hash, h >> 24);
		OF_HASH_ADD(hash, (h >> 16) & 0xFF);
		OF_HASH_ADD(hash, (h >> 8) & 0xFF);
		OF_HASH_ADD(hash, h & 0xFF);
	}

	OF_HASH_FINALIZE(hash);

	return hash;
}

- (void)dealloc
{
	OFObject **objs;
	size_t len, i;

	if (array != nil) {
222
223
224
225
226
227
228






229
230
231
232
233
234
235
236
237
238
239
240
241

242
243

244
245
246

247
248
249
250
251
252

253
254

255
256
257
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263






264


265



266






267


268

269
270







+
+
+
+
+
+







-
-
-
-
-
-
+
-
-
+
-
-
-
+
-
-
-
-
-
-
+
-
-
+
-


}

- addObject: (OFObject*)obj
{
	@throw [OFNotImplementedException newWithClass: isa
					      selector: _cmd];
}

- removeObjectAtIndex: (size_t)index
{
	@throw [OFNotImplementedException newWithClass: isa
					      selector: _cmd];
}

- removeNObjects: (size_t)nobjects
{
	@throw [OFNotImplementedException newWithClass: isa
					      selector: _cmd];
}

- (uint32_t)hash
{
	OFObject **carray = [array cArray];
	size_t i, count = [array count];
	uint32_t hash;

- removeNObjects: (size_t)nobjects
	OF_HASH_INIT(hash);

	 atIndex: (size_t)index
	for (i = 0; i < count; i++) {
		uint32_t h = [carray[i] hash];

{
		OF_HASH_ADD(hash, h >> 24);
		OF_HASH_ADD(hash, (h >> 16) & 0xFF);
		OF_HASH_ADD(hash, (h >> 8) & 0xFF);
		OF_HASH_ADD(hash, h & 0xFF);
	}

	@throw [OFNotImplementedException newWithClass: isa
	OF_HASH_FINALIZE(hash);

					      selector: _cmd];
	return hash;
}
@end