attempting to upgrade to proto 3.5

This commit is contained in:
Kevin Darby committed 2018-12-28 16:02:52 +00:00
1 parent eb1b42a5e8
commit cc3510c6c2
368 files changed
+35764 -24867

No files matched your search

@@ -61,6 +61,7 @@ using internal::WireFormat;
void SetCommonFieldVariables(const FieldDescriptor* descriptor,
std::map<string, string>* variables,
const Options& options) {
(*variables)["ns"] = Namespace(descriptor);
(*variables)["name"] = FieldName(descriptor);
(*variables)["index"] = SimpleItoa(descriptor->index());
(*variables)["number"] = SimpleItoa(descriptor->number());
@@ -95,6 +96,13 @@ void SetCommonFieldVariables(const FieldDescriptor* descriptor,
// By default, empty string, so that generic code used for both oneofs and
// singular fields can be written.
(*variables)["oneof_prefix"] = "";
// These variables are placeholders to pick out the beginning and ends of
// identifiers for annotations (when doing so with existing variables would
// be ambiguous or impossible). They should never be set to anything but the
// empty string.
(*variables)["{"] = "";
(*variables)["}"] = "";
}
void SetCommonOneofFieldVariables(const FieldDescriptor* descriptor,
@@ -194,7 +202,6 @@ const FieldGenerator& FieldGeneratorMap::get(
return *field_generators_[field->index()];
}
} // namespace cpp
} // namespace compiler
} // namespace protobuf