From 93afe2d52d51b6be119fc0aacab9538dd23cd7ae Mon Sep 17 00:00:00 2001 From: Ilya Lipnitskiy Date: Tue, 12 May 2020 12:20:35 -0700 Subject: [PATCH] c_message.cc: Resolve name conflict (Fixes #389) --- protoc-c/c_message.cc | 2 +- t/issue220/issue220.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/protoc-c/c_message.cc b/protoc-c/c_message.cc index d9a6a33..c7bb844 100755 --- a/protoc-c/c_message.cc +++ b/protoc-c/c_message.cc @@ -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"); } diff --git a/t/issue220/issue220.c b/t/issue220/issue220.c index 530f755..a1b4578 100644 --- a/t/issue220/issue220.c +++ b/t/issue220/issue220.c @@ -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; }