summaryrefslogtreecommitdiffstats
path: root/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_helpers.h
diff options
context:
space:
mode:
authormikhnenko <[email protected]>2024-06-25 08:50:35 +0300
committermikhnenko <[email protected]>2024-06-25 09:00:27 +0300
commit509c9fc9e7b9c3b8be7307d72a4c966e5f9aa194 (patch)
tree4b8a6a44009906ac852e59efa0bc78bb12043a5b /contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_helpers.h
parent7688f2313619a39a60ef3c2734d8efbc49a0a6db (diff)
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/csharp/csharp_helpers.h')
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_helpers.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_helpers.h b/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_helpers.h
index 29ff9e8eb67..db93b6211ec 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_helpers.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_helpers.h
@@ -130,7 +130,8 @@ uint GetGroupEndTag(const Descriptor* descriptor);
// descriptors etc, for use in the runtime. This is the only type which is
// allowed to use proto2 syntax, and it generates internal classes.
inline bool IsDescriptorProto(const FileDescriptor* descriptor) {
- return descriptor->name() == "google/protobuf/descriptor.proto";
+ return descriptor->name() == "google/protobuf/descriptor.proto" ||
+ descriptor->name() == "net/proto2/proto/descriptor.proto";
}
// Determines whether the given message is an options message within descriptor.proto.
@@ -138,15 +139,15 @@ inline bool IsDescriptorOptionMessage(const Descriptor* descriptor) {
if (!IsDescriptorProto(descriptor->file())) {
return false;
}
- const TProtoStringType name = descriptor->full_name();
- return name == "google.protobuf.FileOptions" ||
- name == "google.protobuf.MessageOptions" ||
- name == "google.protobuf.FieldOptions" ||
- name == "google.protobuf.OneofOptions" ||
- name == "google.protobuf.EnumOptions" ||
- name == "google.protobuf.EnumValueOptions" ||
- name == "google.protobuf.ServiceOptions" ||
- name == "google.protobuf.MethodOptions";
+ const TProtoStringType name = descriptor->name();
+ return name == "FileOptions" ||
+ name == "MessageOptions" ||
+ name == "FieldOptions" ||
+ name == "OneofOptions" ||
+ name == "EnumOptions" ||
+ name == "EnumValueOptions" ||
+ name == "ServiceOptions" ||
+ name == "MethodOptions";
}
inline bool IsWrapperType(const FieldDescriptor* descriptor) {