diff options
Diffstat (limited to 'src/core/lib/slice/slice_internal.h')
-rw-r--r-- | src/core/lib/slice/slice_internal.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/core/lib/slice/slice_internal.h b/src/core/lib/slice/slice_internal.h index 6185333ca7..6467b0a8d6 100644 --- a/src/core/lib/slice/slice_internal.h +++ b/src/core/lib/slice/slice_internal.h @@ -46,4 +46,19 @@ void grpc_slice_buffer_reset_and_unref_internal(grpc_exec_ctx *exec_ctx, void grpc_slice_buffer_destroy_internal(grpc_exec_ctx *exec_ctx, grpc_slice_buffer *sb); +/* Check if a slice is interned */ +bool grpc_slice_is_interned(grpc_slice slice); + +void grpc_slice_intern_init(void); +void grpc_slice_intern_shutdown(void); +void grpc_test_only_set_slice_hash_seed(uint32_t key); +// if slice matches a static slice, returns the static slice +// otherwise returns the passed in slice (without reffing it) +// used for surface boundaries where we might receive an un-interned static +// string +grpc_slice grpc_slice_maybe_static_intern(grpc_slice slice, + bool *returned_slice_is_different); +uint32_t grpc_static_slice_hash(grpc_slice s); +int grpc_static_slice_eq(grpc_slice a, grpc_slice b); + #endif /* GRPC_CORE_LIB_SLICE_SLICE_INTERNAL_H */ |