c_message.cc: Resolve name conflict (Fixes #389)

This commit is contained in:
Ilya Lipnitskiy 2020-05-12 12:20:35 -07:00
parent 39cd58f5ff
commit 93afe2d52d
2 changed files with 2 additions and 2 deletions

View File

@ -169,7 +169,7 @@ GenerateStructDefinition(io::Printer* printer) {
}
printer->Print(vars, "$ucclassname$__$oneofname$_$fieldname$ = $fieldnum$$opt_comma$\n");
}
printer->Print(vars, " PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE($ucclassname$__$oneofname$)\n");
printer->Print(vars, " PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE($ucclassname$__$oneofname$__CASE)\n");
printer->Outdent();
printer->Print(vars, "} $foneofname$Case;\n\n");
}

View File

@ -8,6 +8,6 @@ int main(void)
{
assert(_MESSAGE_TYPE1__FLAG_IS_INT_SIZE == INT_MAX);
assert(_MESSAGE_TYPE2__ANOTHER_FLAG_IS_INT_SIZE == INT_MAX);
assert(_TOP_LEVEL__SUBMESSAGES_IS_INT_SIZE == INT_MAX);
assert(_TOP_LEVEL__SUBMESSAGES__CASE_IS_INT_SIZE == INT_MAX);
return EXIT_SUCCESS;
}