diff --git a/objectivec/GPBMessage.m b/objectivec/GPBMessage.m index 2e46ebea77..a6bedeb546 100644 --- a/objectivec/GPBMessage.m +++ b/objectivec/GPBMessage.m @@ -47,6 +47,12 @@ #import "GPBUnknownFieldSet_PackagePrivate.h" #import "GPBUtilities_PackagePrivate.h" +// Returns a new instance that was automatically created by |autocreator| for +// its field |field|. +static GPBMessage *GPBCreateMessageWithAutocreator(Class msgClass, GPBMessage *autocreator, + GPBFieldDescriptor *field) + __attribute__((ns_returns_retained)); + // Direct access is use for speed, to avoid even internally declaring things // read/write, etc. The warning is enabled in the project to ensure code calling // protos can turn on -Wdirect-ivar-access without issues. @@ -827,8 +833,8 @@ static void ExtensionMergeFromInputStream(GPBExtensionDescriptor *extension, BOO } } -GPBMessage *GPBCreateMessageWithAutocreator(Class msgClass, GPBMessage *autocreator, - GPBFieldDescriptor *field) { +static GPBMessage *GPBCreateMessageWithAutocreator(Class msgClass, GPBMessage *autocreator, + GPBFieldDescriptor *field) { GPBMessage *message = [[msgClass alloc] init]; message->autocreator_ = autocreator; message->autocreatorField_ = [field retain]; diff --git a/objectivec/GPBMessage_PackagePrivate.h b/objectivec/GPBMessage_PackagePrivate.h index 1b3a99332d..8dc82e4848 100644 --- a/objectivec/GPBMessage_PackagePrivate.h +++ b/objectivec/GPBMessage_PackagePrivate.h @@ -86,15 +86,6 @@ typedef struct GPBMessage_Storage *GPBMessage_StoragePtr; CF_EXTERN_C_BEGIN -// Call this before using the readOnlySemaphore_. This ensures it is created only once. -void GPBPrepareReadOnlySemaphore(GPBMessage *self); - -// Returns a new instance that was automatically created by |autocreator| for -// its field |field|. -GPBMessage *GPBCreateMessageWithAutocreator(Class msgClass, GPBMessage *autocreator, - GPBFieldDescriptor *field) - __attribute__((ns_returns_retained)); - // Returns whether |message| autocreated this message. This is NO if the message // was not autocreated by |message| or if it has been mutated since // autocreation. diff --git a/objectivec/GPBProtocolBuffers_RuntimeSupport.h b/objectivec/GPBProtocolBuffers_RuntimeSupport.h index 804a68a73b..297173d74f 100644 --- a/objectivec/GPBProtocolBuffers_RuntimeSupport.h +++ b/objectivec/GPBProtocolBuffers_RuntimeSupport.h @@ -36,7 +36,6 @@ // clang-format on #import "GPBDescriptor_PackagePrivate.h" -#import "GPBExtensionInternals.h" -#import "GPBMessage_PackagePrivate.h" +#import "GPBMessage.h" #import "GPBRootObject_PackagePrivate.h" #import "GPBUtilities_PackagePrivate.h" diff --git a/objectivec/GPBStruct.pbobjc.h b/objectivec/GPBStruct.pbobjc.h index 8f2f12c73b..b0cc299714 100644 --- a/objectivec/GPBStruct.pbobjc.h +++ b/objectivec/GPBStruct.pbobjc.h @@ -32,7 +32,7 @@ NS_ASSUME_NONNULL_BEGIN * `NullValue` is a singleton enumeration to represent the null value for the * `Value` type union. * - * The JSON representation for `NullValue` is JSON `null`. + * The JSON representation for `NullValue` is JSON `null`. **/ typedef GPB_ENUM(GPBNullValue) { /**