Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
208795c0
Commit
208795c0
authored
9 years ago
by
Benjamin Herzog
Browse files
Options
Downloads
Patches
Plain Diff
Added nullability to service declaration in objc
parent
c2b6a0bc
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/compiler/objective_c_generator.cc
+3
-3
3 additions, 3 deletions
src/compiler/objective_c_generator.cc
src/compiler/objective_c_plugin.cc
+5
-2
5 additions, 2 deletions
src/compiler/objective_c_plugin.cc
with
8 additions
and
5 deletions
src/compiler/objective_c_generator.cc
+
3
−
3
View file @
208795c0
...
@@ -75,11 +75,11 @@ void PrintMethodSignature(Printer *printer, const MethodDescriptor *method,
...
@@ -75,11 +75,11 @@ void PrintMethodSignature(Printer *printer, const MethodDescriptor *method,
if
(
method
->
server_streaming
())
{
if
(
method
->
server_streaming
())
{
printer
->
Print
(
vars
,
printer
->
Print
(
vars
,
" eventHandler:(void(^)(BOOL done, "
" eventHandler:(void(^)(BOOL done, "
"$response_class$ *response, NSError *error))eventHandler"
);
"$response_class$ *
_Nullable
response, NSError *
_Nullable
error))eventHandler"
);
}
else
{
}
else
{
printer
->
Print
(
vars
,
printer
->
Print
(
vars
,
" handler:(void(^)($response_class$ *response, "
" handler:(void(^)($response_class$ *
_Nullable
response, "
"NSError *error))handler"
);
"NSError *
_Nullable
error))handler"
);
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
src/compiler/objective_c_plugin.cc
+
5
−
2
View file @
208795c0
...
@@ -64,7 +64,8 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
...
@@ -64,7 +64,8 @@ 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
"
;
"#import <RxLibrary/GRXWriter.h>
\n\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
...
@@ -81,8 +82,10 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
...
@@ -81,8 +82,10 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
declarations
+=
grpc_objective_c_generator
::
GetHeader
(
service
);
declarations
+=
grpc_objective_c_generator
::
GetHeader
(
service
);
}
}
::
grpc
::
string
nonNullEnd
=
"
\n
NS_ASSUME_NONNULL_END
\n
"
;
Write
(
context
,
file_name
+
".pbrpc.h"
,
Write
(
context
,
file_name
+
".pbrpc.h"
,
imports
+
'\n'
+
proto_imports
+
'\n'
+
declarations
);
imports
+
'\n'
+
proto_imports
+
'\n'
+
declarations
+
nonNullEnd
);
}
}
{
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment