ObjFW  Diff

Differences From Artifact [ed76246fb2]:

To Artifact [b90f5bed16]:


1050
1051
1052
1053
1054
1055
1056























1057
1058
1059
1060
1061
1062
1063
	return hash;
}

- (OFString*)description
{
	return [[self copy] autorelease];
}
























- (of_unichar_t)characterAtIndex: (size_t)index
{
	of_unichar_t c;

	if (![self isUTF8]) {
		if (index >= length)







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
	return hash;
}

- (OFString*)description
{
	return [[self copy] autorelease];
}

- (OFString*)stringBySerializing
{
	OFMutableString *serialization = [[self mutableCopy] autorelease];
	[serialization replaceOccurrencesOfString: @"\\"
				       withString: @"\\\\"];
	[serialization replaceOccurrencesOfString: @"\""
				       withString: @"\\\""];

	if ([self isKindOfClass: [OFMutableString class]])
		[serialization prependString: @"<mutable>\""];
	else
		[serialization prependString: @"\""];
	[serialization appendString: @"\""];

	/*
	 * Class swizzle the string to be immutable. We declared the return type
	 * to be OFString*, so it can't be modified anyway. But not swizzling it
	 * would create a real copy each time -[copy] is called.
	 */
	serialization->isa = [OFString class];
	return serialization;
}

- (of_unichar_t)characterAtIndex: (size_t)index
{
	of_unichar_t c;

	if (![self isUTF8]) {
		if (index >= length)