Add GOOGLE_ prefix before PROTOBUF_DEPRECATED_ATTR

pull/1609/merge
Bo Yang 9 years ago
parent b60e615cba
commit 401e07d372
  1. 2
      src/google/protobuf/compiler/cpp/cpp_enum.cc
  2. 2
      src/google/protobuf/compiler/cpp/cpp_field.cc
  3. 2
      src/google/protobuf/generated_message_util.h

@ -189,7 +189,7 @@ void EnumGenerator::GenerateSymbolImports(io::Printer* printer) {
for (int j = 0; j < descriptor_->value_count(); j++) {
vars["tag"] = EnumValueName(descriptor_->value(j));
vars["deprecated_attr"] = descriptor_->value(j)->options().deprecated() ?
"PROTOBUF_DEPRECATED_ATTR " : "";
"GOOGLE_PROTOBUF_DEPRECATED_ATTR " : "";
printer->Print(vars,
"$deprecated_attr$static $constexpr$const $nested_name$ $tag$ =\n"
" $classname$_$tag$;\n");

@ -78,7 +78,7 @@ void SetCommonFieldVariables(const FieldDescriptor* descriptor,
(*variables)["deprecation"] = descriptor->options().deprecated()
? " PROTOBUF_DEPRECATED" : "";
(*variables)["deprecated_attr"] = descriptor->options().deprecated()
? "PROTOBUF_DEPRECATED_ATTR " : "";
? "GOOGLE_PROTOBUF_DEPRECATED_ATTR " : "";
(*variables)["cppget"] = "Get";

@ -63,7 +63,7 @@ namespace internal {
#undef DEPRECATED_PROTOBUF_FIELD
#define PROTOBUF_DEPRECATED
#define PROTOBUF_DEPRECATED_ATTR
#define GOOGLE_PROTOBUF_DEPRECATED_ATTR
// Constants for special floating point values.

Loading…
Cancel
Save