From 8c88957ef375f3b739b6e72ea5c2fb71b12e1fc2 Mon Sep 17 00:00:00 2001 From: Thomas Van Lenten Date: Tue, 16 Jun 2015 16:45:14 -0400 Subject: Add nonnil markup to ObjC library. Add the clang annotations to the objc library and generated code to help with Swift bridging and compiler checks. --- objectivec/google/protobuf/Struct.pbobjc.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'objectivec/google/protobuf/Struct.pbobjc.h') diff --git a/objectivec/google/protobuf/Struct.pbobjc.h b/objectivec/google/protobuf/Struct.pbobjc.h index 45456955..d72f9738 100644 --- a/objectivec/google/protobuf/Struct.pbobjc.h +++ b/objectivec/google/protobuf/Struct.pbobjc.h @@ -14,6 +14,8 @@ CF_EXTERN_C_BEGIN @class GPBListValue; @class GPBStruct; +NS_ASSUME_NONNULL_BEGIN + #pragma mark - Enum GPBNullValue // `NullValue` is a singleton enumeration to represent the null @@ -28,7 +30,6 @@ GPBEnumDescriptor *GPBNullValue_EnumDescriptor(void); BOOL GPBNullValue_IsValidValue(int32_t value); - #pragma mark - GPBStructRoot @interface GPBStructRoot : GPBRootObject @@ -56,7 +57,7 @@ typedef GPB_ENUM(GPBStruct_FieldNumber) { // Map of dynamically typed values. // |fields| values are |GPBValue| -@property(nonatomic, readwrite, strong) NSMutableDictionary *fields; +@property(nonatomic, readwrite, strong, null_resettable) NSMutableDictionary *fields; @property(nonatomic, readonly) NSUInteger fields_Count; @end @@ -97,16 +98,16 @@ typedef GPB_ENUM(GPBValue_Kind_OneOfCase) { @property(nonatomic, readwrite) double numberValue; // Represents a string value. -@property(nonatomic, readwrite, copy) NSString *stringValue; +@property(nonatomic, readwrite, copy, null_resettable) NSString *stringValue; // Represents a boolean value. @property(nonatomic, readwrite) BOOL boolValue; // Represents a structured value. -@property(nonatomic, readwrite, strong) GPBStruct *structValue; +@property(nonatomic, readwrite, strong, null_resettable) GPBStruct *structValue; // Represents a repeated `Value`. -@property(nonatomic, readwrite, strong) GPBListValue *listValue; +@property(nonatomic, readwrite, strong, null_resettable) GPBListValue *listValue; @end @@ -126,11 +127,13 @@ typedef GPB_ENUM(GPBListValue_FieldNumber) { // Repeated field of dynamically typed values. // |valuesArray| contains |GPBValue| -@property(nonatomic, readwrite, strong) NSMutableArray *valuesArray; +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *valuesArray; @property(nonatomic, readonly) NSUInteger valuesArray_Count; @end +NS_ASSUME_NONNULL_END + CF_EXTERN_C_END // @@protoc_insertion_point(global_scope) -- cgit v1.2.3