ObjFW  Diff

Differences From Artifact [e237ea2567]:

To Artifact [88ca1bcd74]:


1077
1078
1079
1080
1081
1082
1083
1084
1085


1086
1087
1088
1089
1090
1091
1092
1093
1094
1077
1078
1079
1080
1081
1082
1083


1084
1085


1086
1087
1088
1089
1090
1091
1092







-
-
+
+
-
-







}

- initWithSerialization: (OFXMLElement*)element
{
	@try {
		OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];

		if (![[element name] isEqual: @"object"] ||
		    ![[element namespace] isEqual: OF_SERIALIZATION_NS] ||
		if (![[element name] isEqual: [self className]] ||
		    ![[element namespace] isEqual: OF_SERIALIZATION_NS])
		    ![[[element attributeForName: @"class"] stringValue]
		    isEqual: [self className]])
			@throw [OFInvalidArgumentException newWithClass: isa
							       selector: _cmd];

		self = [self initWithString: [element stringValue]];

		[pool release];
	} @catch (id e) {
1269
1270
1271
1272
1273
1274
1275
1276

1277

1278





1279

1280
1281
1282
1283
1284
1285
1286
1287
1288
1289





1290
1291

1292
1293
1294
1295
1296
1297
1298
1299
1267
1268
1269
1270
1271
1272
1273

1274
1275
1276
1277
1278
1279
1280
1281
1282

1283
1284
1285
1286







1287
1288
1289
1290
1291


1292

1293
1294
1295
1296
1297
1298
1299







-
+

+

+
+
+
+
+
-
+



-
-
-
-
-
-
-
+
+
+
+
+
-
-
+
-







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

- (OFXMLElement*)XMLElementBySerializing
{
	OFAutoreleasePool *pool;
	OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
	OFXMLElement *element;
	OFString *className;

	if ([self isKindOfClass: [OFConstantString class]])
		className = @"OFString";
	else
		className = [self className];

	element = [OFXMLElement elementWithName: @"object"
	element = [OFXMLElement elementWithName: className
				      namespace: OF_SERIALIZATION_NS
				    stringValue: self];

	pool = [[OFAutoreleasePool alloc] init];

	if ([self isKindOfClass: [OFConstantString class]])
		[element addAttributeWithName: @"class"
				  stringValue: @"OFString"];
	else
		[element addAttributeWithName: @"class"
	[element retain];
	@try {
		[pool release];
	} @finally {
		[element autorelease];
				  stringValue: [self className]];

	}
	[pool release];

	return element;
}

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