Просмотр исходного кода

Reintroduced definitions for PHP GeneratedClassName() functions

We no longer use these functions, but it turns out that we need to keep
them around for gRPC to use.
Adam Cozzette 5 лет назад
Родитель
Сommit
fbbe11ae49
1 измененных файлов с 12 добавлено и 0 удалено
  1. 12 0
      src/google/protobuf/compiler/php/php_generator.cc

+ 12 - 0
src/google/protobuf/compiler/php/php_generator.cc

@@ -2204,6 +2204,18 @@ void GenerateCWellKnownTypes(const std::vector<const FileDescriptor*>& files,
 
 }  // namespace
 
+std::string GeneratedClassName(const Descriptor* desc) {
+  return GeneratedClassNameImpl(desc);
+}
+
+std::string GeneratedClassName(const EnumDescriptor* desc) {
+  return GeneratedClassNameImpl(desc);
+}
+
+std::string GeneratedClassName(const ServiceDescriptor* desc) {
+  return GeneratedClassNameImpl(desc);
+}
+
 bool Generator::Generate(const FileDescriptor* file,
                          const std::string& parameter,
                          GeneratorContext* generator_context,