Merge pull request #1801 from thomasvl/oneof_framework_build_issues
Use public methods to fetch oneofs in generated code.
This commit is contained in:
commit
b6a620da13
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -119,7 +119,7 @@ void OneofGenerator::GenerateClearFunctionImplementation(io::Printer* printer) {
|
|||
variables_,
|
||||
"void $owning_message_class$_Clear$capitalized_name$OneOfCase($owning_message_class$ *message) {\n"
|
||||
" GPBDescriptor *descriptor = [message descriptor];\n"
|
||||
" GPBOneofDescriptor *oneof = descriptor->oneofs_[$raw_index$];\n"
|
||||
" GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:$raw_index$];\n"
|
||||
" GPBMaybeClearOneof(message, oneof, $index$, 0);\n"
|
||||
"}\n");
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue