diff options
author | Muxi Yan <muxi@users.noreply.github.com> | 2017-06-19 10:32:15 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-19 10:32:15 -0700 |
commit | 070a8eeb281a2659501a60b1bbc86798fcb652c4 (patch) | |
tree | 21a0ad0690bf9333c5632e12dd3b21c699be4754 /src/compiler | |
parent | f0b4c9c78706b2421a072257784554205697ccac (diff) | |
parent | 035f7e4839c272ef48c0c14c8dbf719e3a52a624 (diff) |
Merge pull request #11341 from muxi/fix-objc-plugin-output
Fixes gRPC ObjC plugin's 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 | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/compiler/objective_c_generator_helpers.h b/src/compiler/objective_c_generator_helpers.h index 6f6220c6b4..9c9589e1db 100644 --- a/src/compiler/objective_c_generator_helpers.h +++ b/src/compiler/objective_c_generator_helpers.h @@ -23,6 +23,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; @@ -30,7 +32,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 bd9bc7482c..96a3375e96 100644 --- a/src/compiler/objective_c_plugin.cc +++ b/src/compiler/objective_c_plugin.cc @@ -44,7 +44,8 @@ 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(); { |