Skip to content

Commit 6ed0141

Browse files
author
Adam Cozzette
authored
Merge pull request #4730 from acozzette/xcode
Cherry-picked XCode 10 fixes into 3.6.x branch
2 parents 7e199b9 + a3f31bf commit 6ed0141

File tree

5 files changed

+9
-10
lines changed

5 files changed

+9
-10
lines changed

objectivec/DevTools/full_mac_build.sh

+1-2
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,7 @@ if [[ "${DO_XCODE_IOS_TESTS}" == "yes" ]] ; then
244244
exit 10
245245
;;
246246
7.* )
247-
echo "ERROR: The unittests include Swift code that is now Swift 3.0." 1>&2
248-
echo "ERROR: Xcode 8.0 or higher is required to build the test suite, but the library works with Xcode 7.x." 1>&2
247+
echo "ERROR: Xcode 7.x no longer supported for building, please use 8.0 or higher." 1>&2
249248
exit 11
250249
;;
251250
8.0* )

objectivec/GPBArray.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -2537,12 +2537,12 @@ - (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state
25372537
return [_array countByEnumeratingWithState:state objects:buffer count:len];
25382538
}
25392539

2540-
- (void)enumerateObjectsUsingBlock:(void (^)(id obj, NSUInteger idx, BOOL *stop))block {
2540+
- (void)enumerateObjectsUsingBlock:(void (NS_NOESCAPE ^)(id obj, NSUInteger idx, BOOL *stop))block {
25412541
[_array enumerateObjectsUsingBlock:block];
25422542
}
25432543

25442544
- (void)enumerateObjectsWithOptions:(NSEnumerationOptions)opts
2545-
usingBlock:(void (^)(id obj, NSUInteger idx, BOOL *stop))block {
2545+
usingBlock:(void (NS_NOESCAPE ^)(id obj, NSUInteger idx, BOOL *stop))block {
25462546
[_array enumerateObjectsWithOptions:opts usingBlock:block];
25472547
}
25482548

objectivec/GPBDescriptor.m

+3-3
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ - (void)dealloc {
411411
}
412412

413413
- (NSString *)name {
414-
return @(name_);
414+
return (NSString * _Nonnull)@(name_);
415415
}
416416

417417
- (GPBFieldDescriptor *)fieldWithNumber:(uint32_t)fieldNumber {
@@ -582,7 +582,7 @@ - (uint32_t)number {
582582
}
583583

584584
- (NSString *)name {
585-
return @(description_->name);
585+
return (NSString * _Nonnull)@(description_->name);
586586
}
587587

588588
- (BOOL)isRequired {
@@ -998,7 +998,7 @@ - (instancetype)copyWithZone:(NSZone *)zone {
998998
}
999999

10001000
- (NSString *)singletonName {
1001-
return @(description_->singletonName);
1001+
return (NSString * _Nonnull)@(description_->singletonName);
10021002
}
10031003

10041004
- (const char *)singletonNameC {

objectivec/GPBDictionary.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -12102,14 +12102,14 @@ - (void)setObject:(id)obj forKeyedSubscript:(id<NSCopying>)key {
1210212102
}
1210312103
}
1210412104

12105-
- (void)enumerateKeysAndObjectsUsingBlock:(void (^)(id key,
12105+
- (void)enumerateKeysAndObjectsUsingBlock:(void (NS_NOESCAPE ^)(id key,
1210612106
id obj,
1210712107
BOOL *stop))block {
1210812108
[_dictionary enumerateKeysAndObjectsUsingBlock:block];
1210912109
}
1211012110

1211112111
- (void)enumerateKeysAndObjectsWithOptions:(NSEnumerationOptions)opts
12112-
usingBlock:(void (^)(id key,
12112+
usingBlock:(void (NS_NOESCAPE ^)(id key,
1211312113
id obj,
1211412114
BOOL *stop))block {
1211512115
[_dictionary enumerateKeysAndObjectsWithOptions:opts usingBlock:block];

objectivec/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Requirements
1313
The Objective C implementation requires:
1414

1515
- Objective C 2.0 Runtime (32bit & 64bit iOS, 64bit OS X).
16-
- Xcode 7.0 (or later).
16+
- Xcode 8.0 (or later).
1717
- The library code does *not* use ARC (for performance reasons), but it all can
1818
be called from ARC code.
1919

0 commit comments

Comments
 (0)