diff options
author | Makarand Dharmapurikar <makarandd@google.com> | 2016-06-09 14:25:31 -0700 |
---|---|---|
committer | Makarand Dharmapurikar <makarandd@google.com> | 2016-06-09 14:25:31 -0700 |
commit | 857495ae449a3c528978047e716341e9e316d64b (patch) | |
tree | c632c3fab690ac3922a7616fdf53f694a8df2f28 /src/compiler/objective_c_generator.cc | |
parent | 1bc2976a0f51e14d3525aecbf4b3450445ed2d1b (diff) |
fix for #6834
Removed constants kPackageName and kServiceName so multiple services
can be defined in one proto.
Diffstat (limited to 'src/compiler/objective_c_generator.cc')
-rw-r--r-- | src/compiler/objective_c_generator.cc | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/compiler/objective_c_generator.cc b/src/compiler/objective_c_generator.cc index 71a674174d..6e14d2446f 100644 --- a/src/compiler/objective_c_generator.cc +++ b/src/compiler/objective_c_generator.cc @@ -220,18 +220,13 @@ void PrintMethodImplementations(Printer *printer, {"service_class", ServiceClassName(service)}, {"package", service->file()->package()}}; - printer.Print(vars, - "static NSString *const kPackageName = @\"$package$\";\n"); - printer.Print( - vars, "static NSString *const kServiceName = @\"$service_name$\";\n\n"); - printer.Print(vars, "@implementation $service_class$\n\n"); printer.Print("// Designated initializer\n"); printer.Print("- (instancetype)initWithHost:(NSString *)host {\n"); - printer.Print( + printer.Print(vars, " return (self = [super initWithHost:host" - " packageName:kPackageName serviceName:kServiceName]);\n"); + " packageName:@\"$package$\" serviceName:@\"$service_name$\"]);\n"); printer.Print("}\n\n"); printer.Print( "// Override superclass initializer to disallow different" |