Differences From Artifact [05bf1a86e4]:
- File
src/OFString+PropertyListValue.m
— part of check-in
[b6ee372b98]
at
2020-08-11 19:45:36
on branch trunk
— OFString: Rework number parsing API
This solves the old signed vs. unsigned problem and allows for more
bases than just 8, 10 and 16, as well as auto-detection of the base (if
base is 0). (user: js, size: 5414) [annotate] [blame] [check-ins using]
To Artifact [3c0b0b5b63]:
- File src/OFString+PropertyListParsing.m — part of check-in [d763a9ff86] at 2020-08-13 22:46:28 on branch trunk — propertyListValue -> objectByParsingPropertyList (user: js, size: 5430) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
13 14 15 16 17 18 19 | * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" | | | | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" #import "OFString+PropertyListParsing.h" #import "OFArray.h" #import "OFData.h" #import "OFDate.h" #import "OFDictionary.h" #import "OFNumber.h" #import "OFXMLAttribute.h" #import "OFXMLElement.h" #import "OFInvalidFormatException.h" #import "OFUnsupportedVersionException.h" int _OFString_PropertyListParsing_reference; static id parseElement(OFXMLElement *element); static OFArray * parseArrayElement(OFXMLElement *element) { OFMutableArray *ret = [OFMutableArray array]; |
︙ | ︙ | |||
172 173 174 175 176 177 178 | return parseRealElement(element); else if ([elementName isEqual: @"integer"]) return parseIntegerElement(element); else @throw [OFInvalidFormatException exception]; } | | | | 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | return parseRealElement(element); else if ([elementName isEqual: @"integer"]) return parseIntegerElement(element); else @throw [OFInvalidFormatException exception]; } @implementation OFString (PropertyListParsing) - (id)objectByParsingPropertyList { void *pool = objc_autoreleasePoolPush(); OFXMLElement *rootElement = [OFXMLElement elementWithXMLString: self]; OFXMLAttribute *versionAttribute; OFArray OF_GENERIC(OFXMLElement *) *elements; id ret; |
︙ | ︙ |