Differences From Artifact [30b7ec9161]:
- File src/OFString+PropertyListValue.m — part of check-in [c7f0229795] at 2020-01-02 01:51:34 on branch trunk — Update copyright (user: js, size: 5043) [annotate] [blame] [check-ins using] [more...]
To 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]
︙ | ︙ | |||
121 122 123 124 125 126 127 | { return [OFNumber numberWithDouble: element.doubleValue]; } static OFNumber * parseIntegerElement(OFXMLElement *element) { | > > > > > > > > > | > > > > > > > | 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | { return [OFNumber numberWithDouble: element.doubleValue]; } static OFNumber * parseIntegerElement(OFXMLElement *element) { void *pool = objc_autoreleasePoolPush(); OFString *stringValue; OFNumber *ret; stringValue = element.stringValue.stringByDeletingEnclosingWhitespaces; if ([stringValue hasPrefix: @"-"]) ret = [OFNumber numberWithLongLong: stringValue.longLongValue]; else ret = [OFNumber numberWithUnsignedLongLong: stringValue.unsignedLongLongValue]; [ret retain]; objc_autoreleasePoolPop(pool); return [ret autorelease]; } static id parseElement(OFXMLElement *element) { OFString *elementName; |
︙ | ︙ |