Add GOOGLE_ prefix before PROTOBUF_DEPRECATED_ATTR

This commit is contained in:
Bo Yang 2016-06-07 16:36:13 -07:00
parent b60e615cba
commit 401e07d372
3 changed files with 3 additions and 3 deletions

View File

@ -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");

View File

@ -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";

View File

@ -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.