ObjFW  Diff

Differences From Artifact [8afbccd334]:

To Artifact [80fa284829]:


356
357
358
359
360
361
362








363
364
365
366
367
368
369
		data = [self resizeMemory: data
				 toNItems: count
				   ofSize: itemSize];
	} @catch (OFOutOfMemoryException *e) {
		/* We don't care, as we only made it smaller */
	}
}









- copy
{
	OFDataArray *copy = [[isa alloc] initWithItemSize: itemSize];

	[copy addNItems: count
	     fromCArray: data];







>
>
>
>
>
>
>
>







356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
		data = [self resizeMemory: data
				 toNItems: count
				   ofSize: itemSize];
	} @catch (OFOutOfMemoryException *e) {
		/* We don't care, as we only made it smaller */
	}
}

- (void)removeAllItems
{
	[self freeMemory: data];

	data = NULL;
	count = 0;
}

- copy
{
	OFDataArray *copy = [[isa alloc] initWithItemSize: itemSize];

	[copy addNItems: count
	     fromCArray: data];
600
601
602
603
604
605
606









607
		} @catch (OFOutOfMemoryException *e) {
			/* We don't care, as we only made it smaller */
		}

		size = newSize;
	}
}









@end







>
>
>
>
>
>
>
>
>

608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
		} @catch (OFOutOfMemoryException *e) {
			/* We don't care, as we only made it smaller */
		}

		size = newSize;
	}
}

- (void)removeAllItems
{
	[self freeMemory: data];

	data = NULL;
	count = 0;
	size = 0;
}
@end