Merge branch 'branches/pulls/205' into next

This commit is contained in:
Robert Edmonds 2016-02-02 15:00:51 -05:00
commit bb3cf5a887
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,9 @@
protobuf-c (1.2.1) UNRELEASED
[ Paolo Borelli ]
* protoc-c: Generate code that uses the universal zero initializer {0} when
initializing a oneof union.
protobuf-c (1.2.0)
[ Robert Edmonds ]

View File

@ -236,8 +236,8 @@ GenerateStructDefinition(io::Printer* printer) {
vars["foneofname"] = FullNameToUpper(oneof->full_name());
// Initialize the case enum
printer->Print(vars, ", $foneofname$__NOT_SET");
// Initialize the enum
printer->Print(", {}");
// Initialize the union
printer->Print(", {0}");
}
printer->Print(" }\n\n\n");