From 2e98ed5d17e2e9a8cb557cc762883b792bc4a342 Mon Sep 17 00:00:00 2001 From: Thomas Van Lenten Date: Mon, 18 Jul 2016 11:10:02 -0400 Subject: Use public methods to fetch oneofs in generated code. When building into frameworks, the generated code doesn't always have direct access to the proto internals. Instead of opening up the access, just use the public method to fetch the correct oneof. Fixes https://github.com/google/protobuf/issues/1789 --- objectivec/google/protobuf/Struct.pbobjc.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'objectivec/google') diff --git a/objectivec/google/protobuf/Struct.pbobjc.m b/objectivec/google/protobuf/Struct.pbobjc.m index 538faab3..8ea1f124 100644 --- a/objectivec/google/protobuf/Struct.pbobjc.m +++ b/objectivec/google/protobuf/Struct.pbobjc.m @@ -237,7 +237,7 @@ void SetGPBValue_NullValue_RawValue(GPBValue *message, int32_t value) { void GPBValue_ClearKindOneOfCase(GPBValue *message) { GPBDescriptor *descriptor = [message descriptor]; - GPBOneofDescriptor *oneof = descriptor->oneofs_[0]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; GPBMaybeClearOneof(message, oneof, -1, 0); } #pragma mark - GPBListValue -- cgit v1.2.3