Upstream: https://github.com/catap/ArgumentParser/tree/macports-macOS-12 Adaptation: update paths commit 6f4837a5b586dcbd7787b1881e798920ae20285a Author: Kirill A. Korinsky Date: Fri Dec 3 15:14:16 2021 +0100 compatibility with https://github.com/beelsebob/CoreParse/pull/45 diff --git a/optool/FSArgumentParser/ArgumentParser/FSArgumentSignature.m b/optool/FSArgumentParser/ArgumentParser/FSArgumentSignature.m index eda9ade..edbaecd 100644 --- a/optool/FSArgumentParser/ArgumentParser/FSArgumentSignature.m +++ b/optool/FSArgumentParser/ArgumentParser/FSArgumentSignature.m @@ -108,12 +108,12 @@ NSAssert([[values objectAtIndex:0] isKindOfClass:[CPKeywordToken class]], @"expecting keyword token"); NSAssert([[values objectAtIndex:1] isKindOfClass:[CPKeywordToken class]], @"expecting keyword token"); NSAssert([[values objectAtIndex:3] isKindOfClass:[CPKeywordToken class]], @"expecting keyword token"); - NSNumber * location = [[values objectAtIndex:2] number]; + NSNumber * location = [[values objectAtIndex:2] numberValue]; valueRange.location = [location integerValue]; valueRange.length = [location integerValue]; NSNumber * length; if ([[values objectAtIndex:4] isKindOfClass:[CPNumberToken class]]) { - length = [[values objectAtIndex:4] number]; + length = [[values objectAtIndex:4] numberValue]; valueRange.length = MAX(valueRange.location, [length integerValue]); } else { valueRange.length = NSNotFound; // infinite