diff options
author | Muxi Yan <mxyan@google.com> | 2017-05-30 16:41:51 -0700 |
---|---|---|
committer | Muxi Yan <mxyan@google.com> | 2017-05-30 16:41:51 -0700 |
commit | 88974d506a8dd3598c9d35a0bbf6264afe23731e (patch) | |
tree | a4e333eb978ba668a9b41933c179ebcbb787d0ca /src/compiler | |
parent | 9baf4b19f0e4133dce8e4083fdae4349f6f034da (diff) |
Use protobuf's native upper camel conversion
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/objective_c_generator_helpers.h | 4 | ||||
-rw-r--r-- | src/compiler/objective_c_plugin.cc | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/compiler/objective_c_generator_helpers.h b/src/compiler/objective_c_generator_helpers.h index b482f028a1..3ebd1b1444 100644 --- a/src/compiler/objective_c_generator_helpers.h +++ b/src/compiler/objective_c_generator_helpers.h @@ -38,6 +38,8 @@ #include "src/compiler/config.h" #include "src/compiler/generator_helpers.h" +#include <google/protobuf/compiler/objectivec/objectivec_helpers.h> + namespace grpc_objective_c_generator { using ::grpc::protobuf::FileDescriptor; @@ -45,7 +47,7 @@ using ::grpc::protobuf::ServiceDescriptor; using ::grpc::string; inline string MessageHeaderName(const FileDescriptor *file) { - return grpc_generator::FileNameInUpperCamel(file) + ".pbobjc.h"; + return google::protobuf::compiler::objectivec::FilePath(file) + ".pbobjc.h"; } inline string ServiceClassName(const ServiceDescriptor *service) { diff --git a/src/compiler/objective_c_plugin.cc b/src/compiler/objective_c_plugin.cc index 5178115e44..682d6aa9aa 100644 --- a/src/compiler/objective_c_plugin.cc +++ b/src/compiler/objective_c_plugin.cc @@ -59,7 +59,7 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { return true; } - ::grpc::string file_name = grpc_generator::FileNameInUpperCamel(file); + ::grpc::string file_name = google::protobuf::compiler::objectivec::FilePath(file); ::grpc::string prefix = file->options().objc_class_prefix(); { |