aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/compiler
diff options
context:
space:
mode:
authorGravatar Feng Xiao <xfxyjwf@gmail.com>2017-12-13 14:29:20 -0800
committerGravatar GitHub <noreply@github.com>2017-12-13 14:29:20 -0800
commita4f68d479ad3edde6a24f733e44b65e3014b5f62 (patch)
tree4208b1369c37ec9ef71a297db50f60f94b6738f5 /src/google/protobuf/compiler
parent00ac5c1ab6785d0dc2cc69211f55cd957bf82f3a (diff)
parentb3ac4417b735f73207938c09c41de15608fac48a (diff)
Merge pull request #4044 from xfxyjwf/issue3268
Avoid double underscores in macro name
Diffstat (limited to 'src/google/protobuf/compiler')
-rw-r--r--src/google/protobuf/compiler/cpp/cpp_file.cc6
-rw-r--r--src/google/protobuf/compiler/plugin.pb.h6
2 files changed, 6 insertions, 6 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);
}
diff --git a/src/google/protobuf/compiler/plugin.pb.h b/src/google/protobuf/compiler/plugin.pb.h
index 9618ec00..1fb3061a 100644
--- a/src/google/protobuf/compiler/plugin.pb.h
+++ b/src/google/protobuf/compiler/plugin.pb.h
@@ -1,8 +1,8 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/protobuf/compiler/plugin.proto
-#ifndef PROTOBUF_google_2fprotobuf_2fcompiler_2fplugin_2eproto__INCLUDED
-#define PROTOBUF_google_2fprotobuf_2fcompiler_2fplugin_2eproto__INCLUDED
+#ifndef PROTOBUF_google_2fprotobuf_2fcompiler_2fplugin_2eproto_INCLUDED
+#define PROTOBUF_google_2fprotobuf_2fcompiler_2fplugin_2eproto_INCLUDED
#include <string>
@@ -1383,4 +1383,4 @@ CodeGeneratorResponse::file() const {
// @@protoc_insertion_point(global_scope)
-#endif // PROTOBUF_google_2fprotobuf_2fcompiler_2fplugin_2eproto__INCLUDED
+#endif // PROTOBUF_google_2fprotobuf_2fcompiler_2fplugin_2eproto_INCLUDED