ObjFW  Diff

Differences From Artifact [e268178a8e]:

To Artifact [8ada741898]:


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
		@try {
			[file readIntoBuffer: buffer
				 exactLength: (size_t)size];
		} @finally {
			[file release];
		}
	} @catch (id e) {
		of_free(buffer);
		[self release];

		@throw e;
	}

	@try {
		self = [self initWithItemsNoCopy: buffer
					   count: (size_t)size
				    freeWhenDone: true];
	} @catch (id e) {
		of_free(buffer);
		@throw e;
	}

	return self;
}
#endif








|










|







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
		@try {
			[file readIntoBuffer: buffer
				 exactLength: (size_t)size];
		} @finally {
			[file release];
		}
	} @catch (id e) {
		free(buffer);
		[self release];

		@throw e;
	}

	@try {
		self = [self initWithItemsNoCopy: buffer
					   count: (size_t)size
				    freeWhenDone: true];
	} @catch (id e) {
		free(buffer);
		@throw e;
	}

	return self;
}
#endif

262
263
264
265
266
267
268
269
270
271
272
273
274
275
276

				_items = [self resizeMemory: _items
						       size: _count + length];
				memcpy(_items + _count, buffer, length);
				_count += length;
			}
		} @finally {
			of_free(buffer);
		}

		objc_autoreleasePoolPop(pool);
	} @catch (id e) {
		[self release];
		@throw e;
	}







|







262
263
264
265
266
267
268
269
270
271
272
273
274
275
276

				_items = [self resizeMemory: _items
						       size: _count + length];
				memcpy(_items + _count, buffer, length);
				_count += length;
			}
		} @finally {
			free(buffer);
		}

		objc_autoreleasePoolPop(pool);
	} @catch (id e) {
		[self release];
		@throw e;
	}
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396

	return self;
}

- (void)dealloc
{
	if (_freeWhenDone)
		of_free(_items);

	[_parentData release];

	[super dealloc];
}

- (size_t)count







|







382
383
384
385
386
387
388
389
390
391
392
393
394
395
396

	return self;
}

- (void)dealloc
{
	if (_freeWhenDone)
		free(_items);

	[_parentData release];

	[super dealloc];
}

- (size_t)count