ObjFW  Diff

Differences From Artifact [817897253d]:

To Artifact [38d9eb9459]:


74
75
76
77
78
79
80
81



82


83
84
85
86
87
88
89
	void *pool = objc_autoreleasePoolPush();
	of_dns_class_t DNSClass;

	string = string.uppercaseString;

	if ([string isEqual: @"IN"])
		DNSClass = OF_DNS_CLASS_IN;
	else



		@throw [OFInvalidArgumentException exception];



	objc_autoreleasePoolPop(pool);

	return DNSClass;
}

of_dns_record_type_t of_dns_record_type_parse(OFString *string)







|
>
>
>
|
>
>







74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
	void *pool = objc_autoreleasePoolPush();
	of_dns_class_t DNSClass;

	string = string.uppercaseString;

	if ([string isEqual: @"IN"])
		DNSClass = OF_DNS_CLASS_IN;
	else {
		@try {
			DNSClass = (of_dns_class_t)[string decimalValue];
		} @catch (OFInvalidFormatException *e) {
			@throw [OFInvalidArgumentException exception];
		}
	}

	objc_autoreleasePoolPop(pool);

	return DNSClass;
}

of_dns_record_type_t of_dns_record_type_parse(OFString *string)
111
112
113
114
115
116
117
118




119


120
121
122
123
124
125
126
		recordType = OF_DNS_RECORD_TYPE_TXT;
	else if ([string isEqual: @"RP"])
		recordType = OF_DNS_RECORD_TYPE_RP;
	else if ([string isEqual: @"AAAA"])
		recordType = OF_DNS_RECORD_TYPE_AAAA;
	else if ([string isEqual: @"SRV"])
		recordType = OF_DNS_RECORD_TYPE_SRV;
	else




		@throw [OFInvalidArgumentException exception];



	objc_autoreleasePoolPop(pool);

	return recordType;
}

@implementation OFDNSResourceRecord







|
>
>
>
>
|
>
>







116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
		recordType = OF_DNS_RECORD_TYPE_TXT;
	else if ([string isEqual: @"RP"])
		recordType = OF_DNS_RECORD_TYPE_RP;
	else if ([string isEqual: @"AAAA"])
		recordType = OF_DNS_RECORD_TYPE_AAAA;
	else if ([string isEqual: @"SRV"])
		recordType = OF_DNS_RECORD_TYPE_SRV;
	else {
		@try {
			recordType =
			    (of_dns_record_type_t)[string decimalValue];
		} @catch (OFInvalidFormatException *e) {
			@throw [OFInvalidArgumentException exception];
		}
	}

	objc_autoreleasePoolPop(pool);

	return recordType;
}

@implementation OFDNSResourceRecord