Commit bb3cf5a8 authored by Robert Edmonds's avatar Robert Edmonds

Merge branch 'branches/pulls/205' into next

parents 1d4aff96 58b03b6b
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) protobuf-c (1.2.0)
[ Robert Edmonds ] [ Robert Edmonds ]
......
...@@ -236,8 +236,8 @@ GenerateStructDefinition(io::Printer* printer) { ...@@ -236,8 +236,8 @@ GenerateStructDefinition(io::Printer* printer) {
vars["foneofname"] = FullNameToUpper(oneof->full_name()); vars["foneofname"] = FullNameToUpper(oneof->full_name());
// Initialize the case enum // Initialize the case enum
printer->Print(vars, ", $foneofname$__NOT_SET"); printer->Print(vars, ", $foneofname$__NOT_SET");
// Initialize the enum // Initialize the union
printer->Print(", {}"); printer->Print(", {0}");
} }
printer->Print(" }\n\n\n"); printer->Print(" }\n\n\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment