ObjFW  Diff

Differences From Artifact [881fc1c877]:

To Artifact [db633d72e6]:


162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
				c = isa;
				[super free];
				@throw [OFInvalidEncodingException
					newWithClass: c];
		}

		@try {
			string = [self getMemWithSize: length + 1];
		} @catch (OFException *e) {
			[self free];
			@throw e;
		}
		memcpy(string, str, length + 1);
	}








|







162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
				c = isa;
				[super free];
				@throw [OFInvalidEncodingException
					newWithClass: c];
		}

		@try {
			string = [self allocWithSize: length + 1];
		} @catch (OFException *e) {
			[self free];
			@throw e;
		}
		memcpy(string, str, length + 1);
	}

265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
		length = 0;
		is_utf8 = NO;

		@throw [OFInvalidEncodingException newWithClass: isa];
	}

	length = len;
	string = [self getMemWithSize: length + 1];
	memcpy(string, str, length + 1);

	return self;
}

- (BOOL)isEqual: (id)obj
{







|







265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
		length = 0;
		is_utf8 = NO;

		@throw [OFInvalidEncodingException newWithClass: isa];
	}

	length = len;
	string = [self allocWithSize: length + 1];
	memcpy(string, str, length + 1);

	return self;
}

- (BOOL)isEqual: (id)obj
{