Fix compilation, add a check for no slow usages of grpc_slice_malloc
diff --git a/include/grpc/slice.h b/include/grpc/slice.h
index fe6379c..86a455b 100644
--- a/include/grpc/slice.h
+++ b/include/grpc/slice.h
@@ -128,7 +128,7 @@
* 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].
diff --git a/src/core/lib/slice/slice.c b/src/core/lib/slice/slice.c
index 2852188..e3d0302 100644
--- a/src/core/lib/slice/slice.c
+++ b/src/core/lib/slice/slice.c
@@ -313,7 +313,7 @@
}
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) {
diff --git a/tools/run_tests/sanity/core_banned_functions.py b/tools/run_tests/sanity/core_banned_functions.py
index c3c3cbe..2387c5f 100755
--- a/tools/run_tests/sanity/core_banned_functions.py
+++ b/tools/run_tests/sanity/core_banned_functions.py
@@ -50,6 +50,7 @@
'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