Skip to content

Commit

Permalink
Switch to using protobuf's helper for the file's prefix. (grpc#26605)
Browse files Browse the repository at this point in the history
This adds support for protobuf ObjC support for using the proto package to
define the prefix for the file
(protocolbuffers/protobuf#8760).

Once protobuf cuts a release, it likely makes sense to support the same
generator options that the objc generator does, but for now the environment
variable support can used to enable this when building from recent sources.
  • Loading branch information
thomasvl authored and lidizheng committed Sep 23, 2021
1 parent 94bfc5e commit 9e4571e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compiler/objective_c_generator_helpers.h
Expand Up @@ -37,7 +37,7 @@ inline string MessageHeaderName(const FileDescriptor* file) {

inline string ServiceClassName(const ServiceDescriptor* service) {
const FileDescriptor* file = service->file();
string prefix = file->options().objc_class_prefix();
string prefix = google::protobuf::compiler::objectivec::FileClassPrefix(file);
return prefix + service->name();
}

Expand Down

0 comments on commit 9e4571e

Please sign in to comment.