ObjFW  Diff

Differences From Artifact [50b79cf523]:

To Artifact [489af893ca]:


160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
{
	id *objects = [array cArray], *copy;
	size_t i, count = [array count];

	if (range.length > count - range.start)
		@throw [OFOutOfRangeException exceptionWithClass: isa];

	copy = [self allocMemoryForNItems: range.length
				   ofSize: sizeof(id)];
	memcpy(copy, objects + range.start, range.length * sizeof(id));

	@try {
		[array removeItemsInRange: range];
		mutations++;

		for (i = 0; i < range.length; i++)







|
|







160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
{
	id *objects = [array cArray], *copy;
	size_t i, count = [array count];

	if (range.length > count - range.start)
		@throw [OFOutOfRangeException exceptionWithClass: isa];

	copy = [self allocMemoryWithItemSize: sizeof(*copy)
				       count: range.length];
	memcpy(copy, objects + range.start, range.length * sizeof(id));

	@try {
		[array removeItemsInRange: range];
		mutations++;

		for (i = 0; i < range.length; i++)