Fix compilation, add a check for no slow usages of grpc_slice_malloc

pull/10613/head
Craig Tiller 8 years ago
parent 255ea13aa3
commit a3583b22ea
  1. 2
      include/grpc/slice.h
  2. 2
      src/core/lib/slice/slice.c
  3. 1
      tools/run_tests/sanity/core_banned_functions.py

@ -128,7 +128,7 @@ GPRAPI grpc_slice grpc_slice_split_tail(grpc_slice *s, size_t split);
* refcounts (grpc_slice_split_tail_maybe_ref(..., true) is equivalent to
* grpc_slice_split_tail(...)) */
GPRAPI grpc_slice grpc_slice_split_tail_maybe_ref(grpc_slice *s, size_t split,
bool inc_refs);
int inc_refs);
/* Splits s into two: modifies s to be s[split:s.length], and returns a new
slice, sharing a refcount with s, that contains s[0:split].

@ -313,7 +313,7 @@ grpc_slice grpc_slice_sub(grpc_slice source, size_t begin, size_t end) {
}
grpc_slice grpc_slice_split_tail_maybe_ref(grpc_slice *source, size_t split,
bool incref) {
int incref) {
grpc_slice tail;
if (source->refcount == NULL) {

@ -50,6 +50,7 @@ BANNED_EXCEPT = {
'grpc_os_error(': ['src/core/lib/iomgr/error.c'],
'grpc_wsa_error(': ['src/core/lib/iomgr/error.c'],
'grpc_log_if_error(': ['src/core/lib/iomgr/error.c'],
'grpc_slice_malloc(': ['src/core/lib/slice/slice.c'],
}
errors = 0

Loading…
Cancel
Save