Differences From Artifact [d59ef84b41]:
- File src/OFXMLElement.m — part of check-in [504e13cf00] at 2017-05-13 22:38:02 on branch trunk — Reduce retain + autorelease (user: js, size: 26108) [annotate] [blame] [check-ins using]
To Artifact [5451d232fb]:
- File
src/OFXMLElement.m
— part of check-in
[6b77a5dd8b]
at
2017-05-21 21:28:57
on branch trunk
— Prefix private methods with of_ instead of OF_
This matches Apple's style. (user: js, size: 26108) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
157 158 159 160 161 162 163 | stringValue: nil]; } - initWithName: (OFString *)name namespace: (OFString *)namespace stringValue: (OFString *)stringValue { | | | 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 | stringValue: nil]; } - initWithName: (OFString *)name namespace: (OFString *)namespace stringValue: (OFString *)stringValue { self = [super of_init]; @try { if (name == nil) @throw [OFInvalidArgumentException exception]; _name = [name copy]; _namespace = [namespace copy]; |
︙ | ︙ | |||
183 184 185 186 187 188 189 | } return self; } - initWithElement: (OFXMLElement *)element { | | | 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 | } return self; } - initWithElement: (OFXMLElement *)element { self = [super of_init]; @try { if (element == nil) @throw [OFInvalidArgumentException exception]; _name = [element->_name copy]; _namespace = [element->_namespace copy]; |
︙ | ︙ | |||
272 273 274 275 276 277 278 | return self; } #endif - initWithSerialization: (OFXMLElement *)element { | | | 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 | return self; } #endif - initWithSerialization: (OFXMLElement *)element { self = [super of_init]; @try { void *pool = objc_autoreleasePoolPush(); OFXMLElement *attributesElement, *namespacesElement; OFXMLElement *childrenElement; OFEnumerator *keyEnumerator, *objectEnumerator; id key, object; |
︙ | ︙ | |||
418 419 420 421 422 423 424 | } [ret makeImmutable]; return ret; } | | | 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 | } [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; |
︙ | ︙ | |||
587 588 589 590 591 592 593 | unsigned int ind = (indent ? indentation : 0); if (ind) [tmp addItem: "\n"]; if ([child isKindOfClass: [OFXMLElement class]]) childString = [(OFXMLElement *)child | | | 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 | unsigned int ind = (indent ? indentation : 0); if (ind) [tmp addItem: "\n"]; if ([child isKindOfClass: [OFXMLElement class]]) childString = [(OFXMLElement *)child of_XMLStringWithParent: self namespaces: allNamespaces indentation: ind level: level + 1]; else childString = [child XMLStringWithIndentation: ind level: level + 1]; |
︙ | ︙ | |||
662 663 664 665 666 667 668 | [self freeMemory: cString]; } return ret; } - (OFString *)XMLString { | | | | | 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 | [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 { |
︙ | ︙ |