diff options
author | Feng Xiao <xfxyjwf@gmail.com> | 2017-12-13 13:40:19 -0800 |
---|---|---|
committer | Feng Xiao <xfxyjwf@gmail.com> | 2017-12-13 13:40:19 -0800 |
commit | 50ef6a623e02639fb8c252dfca67691f320e7349 (patch) | |
tree | b740c1148a9eb3e4d2713eb60b1023274d769a5f /src | |
parent | 0a7120ac32e16d49a35abf18186c8c4db515dd02 (diff) | |
download | protobuf-50ef6a623e02639fb8c252dfca67691f320e7349.tar.gz protobuf-50ef6a623e02639fb8c252dfca67691f320e7349.tar.bz2 protobuf-50ef6a623e02639fb8c252dfca67691f320e7349.zip |
Avoid two consecutive underscores in macro name.
Fixes https://github.com/google/protobuf/issues/3268
Diffstat (limited to 'src')
-rw-r--r-- | src/google/protobuf/compiler/cpp/cpp_file.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/google/protobuf/compiler/cpp/cpp_file.cc b/src/google/protobuf/compiler/cpp/cpp_file.cc index 1f90ae43..a922ee97 100644 --- a/src/google/protobuf/compiler/cpp/cpp_file.cc +++ b/src/google/protobuf/compiler/cpp/cpp_file.cc @@ -1145,8 +1145,8 @@ void FileGenerator::GenerateTopHeaderGuard(io::Printer* printer, "// Generated by the protocol buffer compiler. DO NOT EDIT!\n" "// source: $filename$\n" "\n" - "#ifndef PROTOBUF_$filename_identifier$__INCLUDED\n" - "#define PROTOBUF_$filename_identifier$__INCLUDED\n" + "#ifndef PROTOBUF_$filename_identifier$_INCLUDED\n" + "#define PROTOBUF_$filename_identifier$_INCLUDED\n" "\n" "#include <string>\n", "filename", file_->name(), "filename_identifier", filename_identifier); @@ -1156,7 +1156,7 @@ void FileGenerator::GenerateTopHeaderGuard(io::Printer* printer, void FileGenerator::GenerateBottomHeaderGuard( io::Printer* printer, const string& filename_identifier) { printer->Print( - "#endif // PROTOBUF_$filename_identifier$__INCLUDED\n", + "#endif // PROTOBUF_$filename_identifier$_INCLUDED\n", "filename_identifier", filename_identifier); } |