ObjFW  Diff

Differences From Artifact [c8f541f60e]:

To Artifact [a552090953]:


143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162

@implementation OFZIPArchiveEntry
+ (instancetype)entryWithFileName: (OFString *)fileName
{
	return [[[self alloc] initWithFileName: fileName] autorelease];
}

- init
{
	OF_INVALID_INIT_METHOD
}

- initWithFileName: (OFString *)fileName
{
	self = [super init];

	@try {
		void *pool = objc_autoreleasePoolPush();

		if ([fileName UTF8StringLength] > UINT16_MAX)







|




|







143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162

@implementation OFZIPArchiveEntry
+ (instancetype)entryWithFileName: (OFString *)fileName
{
	return [[[self alloc] initWithFileName: fileName] autorelease];
}

- (instancetype)init
{
	OF_INVALID_INIT_METHOD
}

- (instancetype)initWithFileName: (OFString *)fileName
{
	self = [super init];

	@try {
		void *pool = objc_autoreleasePoolPush();

		if ([fileName UTF8StringLength] > UINT16_MAX)
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
	[_fileName release];
	[_extraField release];
	[_fileComment release];

	[super dealloc];
}

- copy
{
	return [self retain];
}

- mutableCopy
{
	OFZIPArchiveEntry *copy =
	    [[OFMutableZIPArchiveEntry alloc] initWithFileName: _fileName];

	@try {
		copy->_versionMadeBy = _versionMadeBy;
		copy->_minVersionNeeded = _minVersionNeeded;







|




|







267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
	[_fileName release];
	[_extraField release];
	[_fileComment release];

	[super dealloc];
}

- (id)copy
{
	return [self retain];
}

- (id)mutableCopy
{
	OFZIPArchiveEntry *copy =
	    [[OFMutableZIPArchiveEntry alloc] initWithFileName: _fileName];

	@try {
		copy->_versionMadeBy = _versionMadeBy;
		copy->_minVersionNeeded = _minVersionNeeded;