Differences From Artifact [f052993408]:
- File src/OFXMLElement.m — part of check-in [737a82e1a4] at 2013-02-05 22:24:31 on branch trunk — Move abort() to make old GCCs happy. (user: js, size: 27821) [annotate] [blame] [check-ins using]
To Artifact [5e664c8a15]:
- File
src/OFXMLElement.m
— part of check-in
[40f7e8bd2e]
at
2013-02-12 18:14:23
on branch trunk
— OFXMLElement: Retain + autorelease attributes.
-[attributeForName:(namespace:)] now returns the attribute retained and
autoreleased instead of returning an inner pointer. (user: js, size: 27867) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
836 837 838 839 840 841 842 | { OFXMLAttribute **objects = [attributes objects]; size_t i, count = [attributes count]; for (i = 0; i < count; i++) if (objects[i]->ns == nil && [objects[i]->name isEqual: attributeName]) | | | | 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 | { OFXMLAttribute **objects = [attributes objects]; size_t i, count = [attributes count]; for (i = 0; i < count; i++) if (objects[i]->ns == nil && [objects[i]->name isEqual: attributeName]) return [[objects[i] retain] autorelease]; return nil; } - (OFXMLAttribute*)attributeForName: (OFString*)attributeName namespace: (OFString*)attributeNS { OFXMLAttribute **objects; size_t i, count; if (attributeNS == nil) return [self attributeForName: attributeName]; objects = [attributes objects]; count = [attributes count]; for (i = 0; i < count; i++) if ([objects[i]->ns isEqual: attributeNS] && [objects[i]->name isEqual: attributeName]) return [[objects[i] retain] autorelease]; return nil; } - (void)removeAttributeForName: (OFString*)attributeName { OFXMLAttribute **objects = [attributes objects]; |
︙ | ︙ |