aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/grpc++
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-10-26 21:08:10 -0700
committerGravatar Craig Tiller <ctiller@google.com>2016-10-26 21:08:10 -0700
commit618e67d655d8a0a345463d6e3e690e258dadd763 (patch)
treea886d8746523a58d9e6f42d31a99b2c943fdb2e4 /include/grpc++
parent2d75209fa8f3e43e4b7994b99b7d09e5116402ab (diff)
s/GPR_SLICE/GRPC_SLICE/g
Diffstat (limited to 'include/grpc++')
-rw-r--r--include/grpc++/impl/codegen/proto_utils.h20
-rw-r--r--include/grpc++/impl/codegen/thrift_serializer.h2
-rw-r--r--include/grpc++/support/slice.h6
3 files changed, 14 insertions, 14 deletions
diff --git a/include/grpc++/impl/codegen/proto_utils.h b/include/grpc++/impl/codegen/proto_utils.h
index 4885ea0ee7..d3be48984e 100644
--- a/include/grpc++/impl/codegen/proto_utils.h
+++ b/include/grpc++/impl/codegen/proto_utils.h
@@ -74,10 +74,10 @@ class GrpcBufferWriter GRPC_FINAL
} else {
slice_ = g_core_codegen_interface->grpc_slice_malloc(block_size_);
}
- *data = GPR_SLICE_START_PTR(slice_);
+ *data = GRPC_SLICE_START_PTR(slice_);
// On win x64, int is only 32bit
- GPR_CODEGEN_ASSERT(GPR_SLICE_LENGTH(slice_) <= INT_MAX);
- byte_count_ += * size = (int)GPR_SLICE_LENGTH(slice_);
+ GPR_CODEGEN_ASSERT(GRPC_SLICE_LENGTH(slice_) <= INT_MAX);
+ byte_count_ += * size = (int)GRPC_SLICE_LENGTH(slice_);
g_core_codegen_interface->grpc_slice_buffer_add(slice_buffer_, slice_);
return true;
}
@@ -88,7 +88,7 @@ class GrpcBufferWriter GRPC_FINAL
backup_slice_ = slice_;
} else {
backup_slice_ = g_core_codegen_interface->grpc_slice_split_tail(
- &slice_, GPR_SLICE_LENGTH(slice_) - count);
+ &slice_, GRPC_SLICE_LENGTH(slice_) - count);
g_core_codegen_interface->grpc_slice_buffer_add(slice_buffer_, slice_);
}
have_backup_ = true;
@@ -126,7 +126,7 @@ class GrpcBufferReader GRPC_FINAL
return false;
}
if (backup_count_ > 0) {
- *data = GPR_SLICE_START_PTR(slice_) + GPR_SLICE_LENGTH(slice_) -
+ *data = GRPC_SLICE_START_PTR(slice_) + GRPC_SLICE_LENGTH(slice_) -
backup_count_;
GPR_CODEGEN_ASSERT(backup_count_ <= INT_MAX);
*size = (int)backup_count_;
@@ -138,10 +138,10 @@ class GrpcBufferReader GRPC_FINAL
return false;
}
g_core_codegen_interface->grpc_slice_unref(slice_);
- *data = GPR_SLICE_START_PTR(slice_);
+ *data = GRPC_SLICE_START_PTR(slice_);
// On win x64, int is only 32bit
- GPR_CODEGEN_ASSERT(GPR_SLICE_LENGTH(slice_) <= INT_MAX);
- byte_count_ += * size = (int)GPR_SLICE_LENGTH(slice_);
+ GPR_CODEGEN_ASSERT(GRPC_SLICE_LENGTH(slice_) <= INT_MAX);
+ byte_count_ += * size = (int)GRPC_SLICE_LENGTH(slice_);
return true;
}
@@ -188,8 +188,8 @@ class SerializationTraits<T, typename std::enable_if<std::is_base_of<
if (byte_size <= internal::kGrpcBufferWriterMaxBufferLength) {
grpc_slice slice = g_core_codegen_interface->grpc_slice_malloc(byte_size);
GPR_CODEGEN_ASSERT(
- GPR_SLICE_END_PTR(slice) ==
- msg.SerializeWithCachedSizesToArray(GPR_SLICE_START_PTR(slice)));
+ GRPC_SLICE_END_PTR(slice) ==
+ msg.SerializeWithCachedSizesToArray(GRPC_SLICE_START_PTR(slice)));
*bp = g_core_codegen_interface->grpc_raw_byte_buffer_create(&slice, 1);
g_core_codegen_interface->grpc_slice_unref(slice);
return g_core_codegen_interface->ok();
diff --git a/include/grpc++/impl/codegen/thrift_serializer.h b/include/grpc++/impl/codegen/thrift_serializer.h
index 691ce1af48..4d3af91b02 100644
--- a/include/grpc++/impl/codegen/thrift_serializer.h
+++ b/include/grpc++/impl/codegen/thrift_serializer.h
@@ -159,7 +159,7 @@ class ThriftSerializer {
grpc_slice slice = grpc_byte_buffer_reader_readall(&reader);
uint32_t len =
- Deserialize(GPR_SLICE_START_PTR(slice), GPR_SLICE_LENGTH(slice), msg);
+ Deserialize(GRPC_SLICE_START_PTR(slice), GRPC_SLICE_LENGTH(slice), msg);
grpc_slice_unref(slice);
diff --git a/include/grpc++/support/slice.h b/include/grpc++/support/slice.h
index 699148ccda..6ee582275d 100644
--- a/include/grpc++/support/slice.h
+++ b/include/grpc++/support/slice.h
@@ -69,13 +69,13 @@ class Slice GRPC_FINAL {
}
/// Byte size.
- size_t size() const { return GPR_SLICE_LENGTH(slice_); }
+ size_t size() const { return GRPC_SLICE_LENGTH(slice_); }
/// Raw pointer to the beginning (first element) of the slice.
- const uint8_t* begin() const { return GPR_SLICE_START_PTR(slice_); }
+ const uint8_t* begin() const { return GRPC_SLICE_START_PTR(slice_); }
/// Raw pointer to the end (one byte \em past the last element) of the slice.
- const uint8_t* end() const { return GPR_SLICE_END_PTR(slice_); }
+ const uint8_t* end() const { return GRPC_SLICE_END_PTR(slice_); }
/// Raw C slice. Caller needs to call grpc_slice_unref when done.
grpc_slice c_slice() const { return grpc_slice_ref(slice_); }