aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_field.cc
diff options
context:
space:
mode:
authormikhnenko <mikhnenko@yandex-team.com>2024-06-25 08:50:35 +0300
committermikhnenko <mikhnenko@yandex-team.com>2024-06-25 09:00:27 +0300
commit509c9fc9e7b9c3b8be7307d72a4c966e5f9aa194 (patch)
tree4b8a6a44009906ac852e59efa0bc78bb12043a5b /contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_field.cc
parent7688f2313619a39a60ef3c2734d8efbc49a0a6db (diff)
downloadydb-509c9fc9e7b9c3b8be7307d72a4c966e5f9aa194.tar.gz
Update protobuf to 3.20.2 and pyprotobuf to 3.20.3
Если это pull-request что-то сломал, то: - если это тест с канонизацией и еще нет pr с переканонизацией, то переканонизируйте пожалуйста сами - проверьте, что тест не флапает - приходите в [DEVTOOLSSUPPORT](https://st.yandex-team.ru/createTicket?queue=DEVTOOLSSUPPORT) - там вам обязательно помогут 987be5ed151f827f7f292f32420470b04b71a91d
Diffstat (limited to 'contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_field.cc')
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_field.cc46
1 files changed, 21 insertions, 25 deletions
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_field.cc b/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_field.cc
index 0e1bb33070..cd0ad8a016 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_field.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_field.cc
@@ -118,40 +118,39 @@ void SetCommonFieldVariables(const FieldDescriptor* descriptor,
} // namespace
-FieldGenerator* FieldGenerator::Make(const FieldDescriptor* field,
- const Options& options) {
+FieldGenerator* FieldGenerator::Make(const FieldDescriptor* field) {
FieldGenerator* result = NULL;
if (field->is_repeated()) {
switch (GetObjectiveCType(field)) {
case OBJECTIVECTYPE_MESSAGE: {
if (field->is_map()) {
- result = new MapFieldGenerator(field, options);
+ result = new MapFieldGenerator(field);
} else {
- result = new RepeatedMessageFieldGenerator(field, options);
+ result = new RepeatedMessageFieldGenerator(field);
}
break;
}
case OBJECTIVECTYPE_ENUM:
- result = new RepeatedEnumFieldGenerator(field, options);
+ result = new RepeatedEnumFieldGenerator(field);
break;
default:
- result = new RepeatedPrimitiveFieldGenerator(field, options);
+ result = new RepeatedPrimitiveFieldGenerator(field);
break;
}
} else {
switch (GetObjectiveCType(field)) {
case OBJECTIVECTYPE_MESSAGE: {
- result = new MessageFieldGenerator(field, options);
+ result = new MessageFieldGenerator(field);
break;
}
case OBJECTIVECTYPE_ENUM:
- result = new EnumFieldGenerator(field, options);
+ result = new EnumFieldGenerator(field);
break;
default:
if (IsReferenceType(field)) {
- result = new PrimitiveObjFieldGenerator(field, options);
+ result = new PrimitiveObjFieldGenerator(field);
} else {
- result = new PrimitiveFieldGenerator(field, options);
+ result = new PrimitiveFieldGenerator(field);
}
break;
}
@@ -160,8 +159,7 @@ FieldGenerator* FieldGenerator::Make(const FieldDescriptor* field,
return result;
}
-FieldGenerator::FieldGenerator(const FieldDescriptor* descriptor,
- const Options& options)
+FieldGenerator::FieldGenerator(const FieldDescriptor* descriptor)
: descriptor_(descriptor) {
SetCommonFieldVariables(descriptor, &variables_);
}
@@ -185,7 +183,8 @@ void FieldGenerator::GenerateCFunctionImplementations(
}
void FieldGenerator::DetermineForwardDeclarations(
- std::set<TProtoStringType>* fwd_decls) const {
+ std::set<TProtoStringType>* fwd_decls,
+ bool include_external_types) const {
// Nothing
}
@@ -266,9 +265,8 @@ void FieldGenerator::FinishInitialization(void) {
}
}
-SingleFieldGenerator::SingleFieldGenerator(const FieldDescriptor* descriptor,
- const Options& options)
- : FieldGenerator(descriptor, options) {
+SingleFieldGenerator::SingleFieldGenerator(const FieldDescriptor* descriptor)
+ : FieldGenerator(descriptor) {
// Nothing
}
@@ -310,9 +308,8 @@ bool SingleFieldGenerator::RuntimeUsesHasBit(void) const {
return true;
}
-ObjCObjFieldGenerator::ObjCObjFieldGenerator(const FieldDescriptor* descriptor,
- const Options& options)
- : SingleFieldGenerator(descriptor, options) {
+ObjCObjFieldGenerator::ObjCObjFieldGenerator(const FieldDescriptor* descriptor)
+ : SingleFieldGenerator(descriptor) {
variables_["property_storage_attribute"] = "strong";
if (IsRetainedName(variables_["name"])) {
variables_["storage_attribute"] = " NS_RETURNS_NOT_RETAINED";
@@ -353,8 +350,8 @@ void ObjCObjFieldGenerator::GeneratePropertyDeclaration(
}
RepeatedFieldGenerator::RepeatedFieldGenerator(
- const FieldDescriptor* descriptor, const Options& options)
- : ObjCObjFieldGenerator(descriptor, options) {
+ const FieldDescriptor* descriptor)
+ : ObjCObjFieldGenerator(descriptor) {
// Default to no comment and let the cases needing it fill it in.
variables_["array_comment"] = "";
}
@@ -407,19 +404,18 @@ bool RepeatedFieldGenerator::RuntimeUsesHasBit(void) const {
return false; // The array (or map/dict) having anything is what is used.
}
-FieldGeneratorMap::FieldGeneratorMap(const Descriptor* descriptor,
- const Options& options)
+FieldGeneratorMap::FieldGeneratorMap(const Descriptor* descriptor)
: descriptor_(descriptor),
field_generators_(descriptor->field_count()),
extension_generators_(descriptor->extension_count()) {
// Construct all the FieldGenerators.
for (int i = 0; i < descriptor->field_count(); i++) {
field_generators_[i].reset(
- FieldGenerator::Make(descriptor->field(i), options));
+ FieldGenerator::Make(descriptor->field(i)));
}
for (int i = 0; i < descriptor->extension_count(); i++) {
extension_generators_[i].reset(
- FieldGenerator::Make(descriptor->extension(i), options));
+ FieldGenerator::Make(descriptor->extension(i)));
}
}