ObjFW  Diff

Differences From Artifact [0b50609229]:

To Artifact [8558828739]:


521
522
523
524
525
526
527


528


529
530

531
532

533
534

535
536
537
538
539

540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560


561
562
563

564
565
566

567
568
569
570
571
572
573
521
522
523
524
525
526
527
528
529

530
531
532
533
534
535

536
537

538
539
540
541
542

543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562


563
564

565

566
567
568

569
570
571
572
573
574
575
576







+
+
-
+
+


+

-
+

-
+




-
+



















-
-
+
+
-

-
+


-
+







		i += [_namespace UTF8StringLength];
		cString[i++] = '\'';
	}

	/* Attributes */
	for (OFXMLAttribute *attribute in _attributes) {
		void *pool2 = objc_autoreleasePoolPush();
		const char *attributeNameCString =
		    [attribute->_name UTF8String];
		OFString *attributeName = [attribute name];
		size_t attributeNameLength =
		    [attribute->_name UTF8StringLength];
		OFString *attributePrefix = nil;
		OFString *tmp = [[attribute stringValue] stringByXMLEscaping];
		char delimiter = (attribute->_useDoubleQuotes ? '"' : '\'');

		if ([attribute namespace] != nil &&
		if (attribute->_namespace != nil &&
		    (attributePrefix = [allNamespaces objectForKey:
		    [attribute namespace]]) == nil)
		    attribute->_namespace]) == nil)
			@throw [OFUnboundNamespaceException
			    exceptionWithNamespace: [attribute namespace]
					   element: self];

		length += [attributeName UTF8StringLength] +
		length += attributeNameLength +
		    (attributePrefix != nil ?
		    [attributePrefix UTF8StringLength] + 1 : 0) +
		    [tmp UTF8StringLength] + 4;

		@try {
			cString = [self resizeMemory: cString
						size: length];
		} @catch (id e) {
			[self freeMemory: cString];
			@throw e;
		}

		cString[i++] = ' ';
		if (attributePrefix != nil) {
			memcpy(cString + i, [attributePrefix UTF8String],
			    [attributePrefix UTF8StringLength]);
			i += [attributePrefix UTF8StringLength];
			cString[i++] = ':';
		}
		memcpy(cString + i, [attributeName UTF8String],
		    [attributeName UTF8StringLength]);
		memcpy(cString + i, attributeNameCString, attributeNameLength);
		i += attributeNameLength;
		i += [attributeName UTF8StringLength];
		cString[i++] = '=';
		cString[i++] = '\'';
		cString[i++] = delimiter;
		memcpy(cString + i, [tmp UTF8String], [tmp UTF8StringLength]);
		i += [tmp UTF8StringLength];
		cString[i++] = '\'';
		cString[i++] = delimiter;

		objc_autoreleasePoolPop(pool2);
	}

	/* Children */
	if (_children != nil) {
		OFMutableData *tmp = [OFMutableData data];