ObjFW  Diff

Differences From Artifact [d2aadda558]:

To Artifact [d6f7fc5fb8]:


128
129
130
131
132
133
134
135

136
137
138
139
140
141
142
143
144
145
128
129
130
131
132
133
134

135

136

137
138
139
140
141
142
143







-
+
-

-








- initWithItemSize: (size_t)itemSize
	  capacity: (size_t)capacity
{
	self = [super init];

	@try {
		if (itemSize == 0) {
		if (itemSize == 0)
			[self release];
			@throw [OFInvalidArgumentException exception];
		}

		_items = [self allocMemoryWithSize: itemSize
					     count: capacity];

		_itemSize = itemSize;
		_capacity = capacity;
	} @catch (id e) {
708
709
710
711
712
713
714
715

716
717
718
719
720
721
722
723
724
725
706
707
708
709
710
711
712

713

714

715
716
717
718
719
720
721







-
+
-

-







	  capacity: (size_t)capacity
{
	self = [super init];

	@try {
		size_t size, lastPageByte;

		if (itemSize == 0) {
		if (itemSize == 0)
			[self release];
			@throw [OFInvalidArgumentException exception];
		}

		if (capacity > SIZE_MAX / itemSize)
			@throw [OFOutOfRangeException exception];

		lastPageByte = [OFSystemInfo pageSize] - 1;
		size = (capacity * itemSize + lastPageByte) & ~lastPageByte;