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/GPBUtilities.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'objectivec/GPBUtilities.h') diff --git a/objectivec/GPBUtilities.h b/objectivec/GPBUtilities.h index 87cd32c7..1301b436 100644 --- a/objectivec/GPBUtilities.h +++ b/objectivec/GPBUtilities.h @@ -36,13 +36,16 @@ CF_EXTERN_C_BEGIN +NS_ASSUME_NONNULL_BEGIN + // Generates a string that should be a valid "Text Format" for the C++ version // of Protocol Buffers. lineIndent can be nil if no additional line indent is // needed. The comments provide the names according to the ObjC library, they // most likely won't exactly match the original .proto file. -NSString *GPBTextFormatForMessage(GPBMessage *message, NSString *lineIndent); +NSString *GPBTextFormatForMessage(GPBMessage *message, + NSString * __nullable lineIndent); NSString *GPBTextFormatForUnknownFieldSet(GPBUnknownFieldSet *unknownSet, - NSString *lineIndent); + NSString * __nullable lineIndent); // // Test if the given field is set on a message. @@ -128,6 +131,8 @@ void GPBSetMessageMapField(GPBMessage *self, GPBFieldDescriptor *field, id dicti // objects. NSData *GPBEmptyNSData(void) __attribute__((pure)); +NS_ASSUME_NONNULL_END + CF_EXTERN_C_END -- cgit v1.2.3