aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-07-13 15:40:24 -0700
committerGravatar Craig Tiller <ctiller@google.com>2016-07-13 15:40:24 -0700
commit22ac0d17c13a02ef4400700f5fe1af43c78d4931 (patch)
tree5c45770eaedb68fdbe42b5e5f54ae47446f61402 /include
parentc8a8513d5911e99241ec0bb7b038d4344110cb41 (diff)
parent8da7b1f779b36394008aad5ef40f49b03ce79c7b (diff)
Merge branch 'delayed-write' into grand-unified-closures
Diffstat (limited to 'include')
-rw-r--r--include/grpc++/support/slice.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/grpc++/support/slice.h b/include/grpc++/support/slice.h
index cec9062d4f..5874b4f5ae 100644
--- a/include/grpc++/support/slice.h
+++ b/include/grpc++/support/slice.h
@@ -77,6 +77,9 @@ class Slice GRPC_FINAL {
/// 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_); }
+ /// Raw C slice. Caller needs to call gpr_slice_unref when done.
+ gpr_slice c_slice() const { return gpr_slice_ref(slice_); }
+
private:
friend class ByteBuffer;