ObjFW  Diff

Differences From Artifact [9a07b7851a]:

To Artifact [96ab47295a]:


208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226

- (void)getObjects: (id*)buffer
	   inRange: (of_range_t)range
{
	id *objects = [array cArray];
	size_t i, count = [array count];

	if (range.start + range.length > count)
		@throw [OFOutOfRangeException exceptionWithClass: [self class]];

	for (i = 0; i < range.length; i++)
		buffer[i] = objects[range.start + i];
}

- (size_t)indexOfObject: (id)object
{
	id *objects = [array cArray];
	size_t i, count = [array count];








|



|







208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226

- (void)getObjects: (id*)buffer
	   inRange: (of_range_t)range
{
	id *objects = [array cArray];
	size_t i, count = [array count];

	if (range.location + range.length > count)
		@throw [OFOutOfRangeException exceptionWithClass: [self class]];

	for (i = 0; i < range.length; i++)
		buffer[i] = objects[range.location + i];
}

- (size_t)indexOfObject: (id)object
{
	id *objects = [array cArray];
	size_t i, count = [array count];

250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267

	if (![self isKindOfClass: [OFMutableArray class]])
		return [OFArray_adjacentSubarray arrayWithArray: self
							  range: range];

	count = [array count];

	if (range.start + range.length > count)
		@throw [OFOutOfRangeException exceptionWithClass: [self class]];

	return [OFArray arrayWithObjects: (id*)[array cArray] + range.start
				   count: range.length];
}

- (BOOL)isEqual: (id)object
{
	OFArray *otherArray;
	id *objects, *otherObjects;







|


|







250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267

	if (![self isKindOfClass: [OFMutableArray class]])
		return [OFArray_adjacentSubarray arrayWithArray: self
							  range: range];

	count = [array count];

	if (range.location + range.length > count)
		@throw [OFOutOfRangeException exceptionWithClass: [self class]];

	return [OFArray arrayWithObjects: (id*)[array cArray] + range.location
				   count: range.length];
}

- (BOOL)isEqual: (id)object
{
	OFArray *otherArray;
	id *objects, *otherObjects;