aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Jorge Canizales <jcanizales@google.com>2015-08-08 15:01:24 -0700
committerGravatar Jorge Canizales <jcanizales@google.com>2015-08-08 15:01:24 -0700
commitb3584aa21e5828a2949f93dcb097cccef2d74105 (patch)
tree0640e908e110cbb8249255e12ff59c29817dfe7f
parentfaddd3c3f97750c155a1fe24dd86b94efd1b8edb (diff)
Have ObjC use the new future-proofed C interface
-rw-r--r--src/objective-c/GRPCClient/private/GRPCCompletionQueue.m5
-rw-r--r--src/objective-c/GRPCClient/private/GRPCHost.m2
-rw-r--r--src/objective-c/GRPCClient/private/GRPCUnsecuredChannel.m2
-rw-r--r--src/objective-c/GRPCClient/private/GRPCWrappedCall.m4
4 files changed, 7 insertions, 6 deletions
diff --git a/src/objective-c/GRPCClient/private/GRPCCompletionQueue.m b/src/objective-c/GRPCClient/private/GRPCCompletionQueue.m
index 696069c200..ea2b01ee1d 100644
--- a/src/objective-c/GRPCClient/private/GRPCCompletionQueue.m
+++ b/src/objective-c/GRPCClient/private/GRPCCompletionQueue.m
@@ -43,7 +43,7 @@
- (instancetype)init {
if ((self = [super init])) {
- _unmanagedQueue = grpc_completion_queue_create();
+ _unmanagedQueue = grpc_completion_queue_create(NULL);
// This is for the following block to capture the pointer by value (instead
// of retaining self and doing self->_unmanagedQueue). This is essential
@@ -64,7 +64,8 @@
while (YES) {
// The following call blocks until an event is available.
grpc_event event = grpc_completion_queue_next(unmanagedQueue,
- gpr_inf_future(GPR_CLOCK_REALTIME));
+ gpr_inf_future(GPR_CLOCK_REALTIME),
+ NULL);
GRPCQueueCompletionHandler handler;
switch (event.type) {
case GRPC_OP_COMPLETE:
diff --git a/src/objective-c/GRPCClient/private/GRPCHost.m b/src/objective-c/GRPCClient/private/GRPCHost.m
index d902f95b51..a7142d0f00 100644
--- a/src/objective-c/GRPCClient/private/GRPCHost.m
+++ b/src/objective-c/GRPCClient/private/GRPCHost.m
@@ -97,7 +97,7 @@
queue.unmanagedQueue,
path.UTF8String,
self.hostName.UTF8String,
- gpr_inf_future(GPR_CLOCK_REALTIME));
+ gpr_inf_future(GPR_CLOCK_REALTIME), NULL);
}
- (GRPCChannel *)channel {
diff --git a/src/objective-c/GRPCClient/private/GRPCUnsecuredChannel.m b/src/objective-c/GRPCClient/private/GRPCUnsecuredChannel.m
index 070a529629..15b6ffc75c 100644
--- a/src/objective-c/GRPCClient/private/GRPCUnsecuredChannel.m
+++ b/src/objective-c/GRPCClient/private/GRPCUnsecuredChannel.m
@@ -38,7 +38,7 @@
@implementation GRPCUnsecuredChannel
- (instancetype)initWithHost:(NSString *)host {
- return (self = [super initWithChannel:grpc_insecure_channel_create(host.UTF8String, NULL)]);
+ return (self = [super initWithChannel:grpc_insecure_channel_create(host.UTF8String, NULL, NULL)]);
}
// TODO(jcanizales): GRPCSecureChannel and GRPCUnsecuredChannel are just convenience initializers
diff --git a/src/objective-c/GRPCClient/private/GRPCWrappedCall.m b/src/objective-c/GRPCClient/private/GRPCWrappedCall.m
index 951c051036..fe3d51da53 100644
--- a/src/objective-c/GRPCClient/private/GRPCWrappedCall.m
+++ b/src/objective-c/GRPCClient/private/GRPCWrappedCall.m
@@ -282,7 +282,7 @@
for (GRPCOperation *operation in operations) {
[operation finish];
}
- }));
+ }), NULL);
gpr_free(ops_array);
if (error != GRPC_CALL_OK) {
@@ -293,7 +293,7 @@
}
- (void)cancel {
- grpc_call_cancel(_call);
+ grpc_call_cancel(_call, NULL);
}
- (void)dealloc {