Merge pull request #285 from protobuf-c/edmonds/protobuf-2.x-compatibility

Restore protobuf-2.x compatibility
This commit is contained in:
Robert Edmonds 2017-08-14 15:36:00 -04:00 committed by GitHub
commit 4912c5a574

View File

@ -120,9 +120,11 @@ void FileGenerator::GenerateHeader(io::Printer* printer) {
string filename_identifier = FilenameIdentifier(file_->name());
int min_header_version = 1000000;
#if defined(HAVE_PROTO3)
if (file_->syntax() == FileDescriptor::SYNTAX_PROTO3) {
min_header_version = 1003000;
}
#endif
// Generate top of header.
printer->Print(