aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c/GRPCClient
diff options
context:
space:
mode:
authorGravatar David Garcia Quintas <dgq@google.com>2015-06-08 16:31:19 -0700
committerGravatar David Garcia Quintas <dgq@google.com>2015-06-08 20:06:17 -0700
commit59f905d79a109644a0d1f3ec73f34cbae65448fc (patch)
tree9ca4e84a195b4a8d8332d24362bc6828c74d4dea /src/objective-c/GRPCClient
parent237443faa49dce1ba4df2d74000acef2802b3bdd (diff)
Changes to byte_buffer based on comments.
Diffstat (limited to 'src/objective-c/GRPCClient')
-rw-r--r--src/objective-c/GRPCClient/private/NSData+GRPC.m4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/objective-c/GRPCClient/private/NSData+GRPC.m b/src/objective-c/GRPCClient/private/NSData+GRPC.m
index 3a7f76887b..e6a6c3c605 100644
--- a/src/objective-c/GRPCClient/private/NSData+GRPC.m
+++ b/src/objective-c/GRPCClient/private/NSData+GRPC.m
@@ -55,7 +55,7 @@ static void CopyByteBufferToCharArray(grpc_byte_buffer *buffer, char *array) {
static grpc_byte_buffer *CopyCharArrayToNewByteBuffer(const char *array,
size_t length) {
gpr_slice slice = gpr_slice_from_copied_buffer(array, length);
- grpc_byte_buffer *buffer = grpc_byte_buffer_create(&slice, 1);
+ grpc_byte_buffer *buffer = grpc_raw_byte_buffer_create(&slice, 1);
gpr_slice_unref(slice);
return buffer;
}
@@ -85,7 +85,7 @@ static grpc_byte_buffer *CopyCharArrayToNewByteBuffer(const char *array,
// The following implementation is thus not optimal, sometimes requiring two
// copies (one by self.bytes and another by gpr_slice_from_copied_buffer).
// If it turns out to be an issue, we can use enumerateByteRangesUsingblock:
- // to create an array of gpr_slice objects to pass to grpc_byte_buffer_create.
+ // to create an array of gpr_slice objects to pass to grpc_raw_byte_buffer_create.
// That would make it do exactly one copy, always.
return CopyCharArrayToNewByteBuffer((const char *)self.bytes, (size_t)self.length);
}