Skip to content
Snippets Groups Projects
Commit ee6de936 authored by Benjamin Herzog's avatar Benjamin Herzog
Browse files

Move nonnull begin to correct position

parent 208795c0
No related branches found
No related tags found
No related merge requests found
...@@ -64,8 +64,7 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { ...@@ -64,8 +64,7 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
".pbobjc.h\"\n\n" ".pbobjc.h\"\n\n"
"#import <ProtoRPC/ProtoService.h>\n" "#import <ProtoRPC/ProtoService.h>\n"
"#import <RxLibrary/GRXWriteable.h>\n" "#import <RxLibrary/GRXWriteable.h>\n"
"#import <RxLibrary/GRXWriter.h>\n\n" "#import <RxLibrary/GRXWriter.h>\n";
"NS_ASSUME_NONNULL_BEGIN\n\n";
// TODO(jcanizales): Instead forward-declare the input and output types // TODO(jcanizales): Instead forward-declare the input and output types
// and import the files in the .pbrpc.m // and import the files in the .pbrpc.m
...@@ -82,10 +81,12 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { ...@@ -82,10 +81,12 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
declarations += grpc_objective_c_generator::GetHeader(service); declarations += grpc_objective_c_generator::GetHeader(service);
} }
::grpc::string nonNullBegin = "\nNS_ASSUME_NONNULL_BEGIN\n\n";
::grpc::string nonNullEnd = "\nNS_ASSUME_NONNULL_END\n"; ::grpc::string nonNullEnd = "\nNS_ASSUME_NONNULL_END\n";
Write(context, file_name + ".pbrpc.h", Write(context, file_name + ".pbrpc.h",
imports + '\n' + proto_imports + '\n' + declarations + nonNullEnd); imports + '\n' + proto_imports + '\n' + nonNullBegin +
declarations + nonNullEnd);
} }
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment