Differences From Artifact [054747ac72]:
- File src/OFDNSResourceRecord.m — part of check-in [3356b9940c] at 2020-04-19 10:02:51 on branch trunk — Clean up which exception is used when a little (user: js, size: 29037) [annotate] [blame] [check-ins using] [more...]
To Artifact [08b68e10ee]:
- File
src/OFDNSResourceRecord.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: 29090) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
77 78 79 80 81 82 83 | string = string.uppercaseString; if ([string isEqual: @"IN"]) DNSClass = OF_DNS_CLASS_IN; else { @try { | | > | 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | string = string.uppercaseString; if ([string isEqual: @"IN"]) DNSClass = OF_DNS_CLASS_IN; else { @try { DNSClass = (of_dns_class_t) [string unsignedLongLongValueWithBase: 0]; } @catch (OFInvalidFormatException *e) { @throw [OFInvalidArgumentException exception]; } } objc_autoreleasePoolPop(pool); |
︙ | ︙ | |||
121 122 123 124 125 126 127 | recordType = OF_DNS_RECORD_TYPE_AAAA; else if ([string isEqual: @"SRV"]) recordType = OF_DNS_RECORD_TYPE_SRV; else if ([string isEqual: @"ALL"]) recordType = OF_DNS_RECORD_TYPE_ALL; else { @try { | | | | 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 | recordType = OF_DNS_RECORD_TYPE_AAAA; else if ([string isEqual: @"SRV"]) recordType = OF_DNS_RECORD_TYPE_SRV; else if ([string isEqual: @"ALL"]) recordType = OF_DNS_RECORD_TYPE_ALL; else { @try { recordType = (of_dns_record_type_t) [string unsignedLongLongValueWithBase: 0]; } @catch (OFInvalidFormatException *e) { @throw [OFInvalidArgumentException exception]; } } objc_autoreleasePoolPop(pool); |
︙ | ︙ |