Differences From Artifact [01c2a13f7b]:
- File
src/OFXMLElement.m
— part of check-in
[1255f3a11a]
at
2012-08-10 20:08:24
on branch trunk
— Directly use the runtime's autorelease pools.
This greatly improves performance, as it gets rid of the overhead of
OFAutoreleasePool. (user: js, size: 26203) [annotate] [blame] [check-ins using]
To Artifact [914801392e]:
- File src/OFXMLElement.m — part of check-in [c137da5e5b] at 2012-09-16 15:27:48 on branch trunk — Prefix all private methods with OF_. (user: js, size: 26180) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
451 452 453 454 455 456 457 | } [ret makeImmutable]; return ret; } | | | | | | 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 | } [ret makeImmutable]; return ret; } - (OFString*)OF_XMLStringWithParent: (OFXMLElement*)parent namespaces: (OFDictionary*)allNamespaces indentation: (unsigned int)indentation level: (unsigned int)level { void *pool; char *cString; size_t length, i, j, attributesCount; OFString *prefix, *parentPrefix; OFXMLAttribute **attributesObjects; OFString *ret; |
︙ | ︙ | |||
627 628 629 630 631 632 633 | if (ind) [tmp addItem: "\n"]; if ([childrenObjects[j] isKindOfClass: [OFXMLElement class]]) child = [childrenObjects[j] | | | | | | 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 | if (ind) [tmp addItem: "\n"]; if ([childrenObjects[j] isKindOfClass: [OFXMLElement class]]) child = [childrenObjects[j] OF_XMLStringWithParent: self namespaces: allNamespaces indentation: ind level: level + 1]; else child = [childrenObjects[j] XMLStringWithIndentation: ind level: level + 1]; [tmp addItemsFromCArray: [child UTF8String] count: [child UTF8StringLength]]; |
︙ | ︙ | |||
701 702 703 704 705 706 707 | [self freeMemory: cString]; } return ret; } - (OFString*)XMLString { | | | | | | | | | | | | | | 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 | [self freeMemory: cString]; } return ret; } - (OFString*)XMLString { return [self OF_XMLStringWithParent: nil namespaces: nil indentation: 0 level: 0]; } - (OFString*)XMLStringWithIndentation: (unsigned int)indentation { return [self OF_XMLStringWithParent: nil namespaces: nil indentation: indentation level: 0]; } - (OFString*)XMLStringWithIndentation: (unsigned int)indentation level: (unsigned int)level { return [self OF_XMLStringWithParent: nil namespaces: nil indentation: indentation level: level]; } - (OFXMLElement*)XMLElementBySerializing { void *pool = objc_autoreleasePoolPush(); OFXMLElement *element; |
︙ | ︙ |