aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c/GRPCClient/GRPCCall.m
diff options
context:
space:
mode:
authorGravatar Muxi Yan <mxyan@google.com>2018-12-06 12:42:27 -0800
committerGravatar Muxi Yan <mxyan@google.com>2018-12-06 12:51:24 -0800
commit76f1ec16e1880605215beb60a204b0cab7c36b2d (patch)
tree108a7fefb41921a7a9fbb9cd94e3334496ebeab2 /src/objective-c/GRPCClient/GRPCCall.m
parent70f34521deaeaf0d783f30d121fd26787135ac04 (diff)
sensible nullability annotation for old API
Diffstat (limited to 'src/objective-c/GRPCClient/GRPCCall.m')
-rw-r--r--src/objective-c/GRPCClient/GRPCCall.m7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/objective-c/GRPCClient/GRPCCall.m b/src/objective-c/GRPCClient/GRPCCall.m
index dad8594a26..9b3bcd385e 100644
--- a/src/objective-c/GRPCClient/GRPCCall.m
+++ b/src/objective-c/GRPCClient/GRPCCall.m
@@ -445,6 +445,9 @@ const char *kCFStreamVarName = "grpc_cfstream";
}
+ (void)setCallSafety:(GRPCCallSafety)callSafety host:(NSString *)host path:(NSString *)path {
+ if (host.length == 0 || path.length == 0) {
+ return;
+ }
NSString *hostAndPath = [NSString stringWithFormat:@"%@/%@", host, path];
switch (callSafety) {
case GRPCCallSafetyDefault:
@@ -466,10 +469,6 @@ const char *kCFStreamVarName = "grpc_cfstream";
return [callFlags[hostAndPath] intValue];
}
-- (instancetype)init {
- return [self initWithHost:nil path:nil requestsWriter:nil];
-}
-
// Designated initializer
- (instancetype)initWithHost:(NSString *)host
path:(NSString *)path