Fix by misc-definitions-in-headers

pull/24489/head
Esun Kim 4 years ago
parent 1f45a189f6
commit 5b375a3728
  1. 6
      src/core/lib/iomgr/python_util.h
  2. 6
      test/cpp/microbenchmarks/callback_unary_ping_pong.h

@ -29,17 +29,17 @@
// They are easier to define here (rather than in Cython)
// because Cython doesn't handle #defines well.
grpc_error* grpc_socket_error(char* error) {
inline grpc_error* grpc_socket_error(char* error) {
return grpc_error_set_int(GRPC_ERROR_CREATE_FROM_COPIED_STRING(error),
GRPC_ERROR_INT_GRPC_STATUS,
GRPC_STATUS_UNAVAILABLE);
}
char* grpc_slice_buffer_start(grpc_slice_buffer* buffer, int i) {
inline char* grpc_slice_buffer_start(grpc_slice_buffer* buffer, int i) {
return (char*)GRPC_SLICE_START_PTR(buffer->slices[i]);
}
int grpc_slice_buffer_length(grpc_slice_buffer* buffer, int i) {
inline int grpc_slice_buffer_length(grpc_slice_buffer* buffer, int i) {
return GRPC_SLICE_LENGTH(buffer->slices[i]);
}

@ -36,9 +36,9 @@ namespace testing {
* BENCHMARKING KERNELS
*/
void SendCallbackUnaryPingPong(benchmark::State* state, ClientContext* cli_ctx,
EchoRequest* request, EchoResponse* response,
EchoTestService::Stub* stub_, bool* done,
inline void SendCallbackUnaryPingPong(
benchmark::State* state, ClientContext* cli_ctx, EchoRequest* request,
EchoResponse* response, EchoTestService::Stub* stub_, bool* done,
std::mutex* mu, std::condition_variable* cv) {
int response_msgs_size = state->range(1);
cli_ctx->AddMetadata(kServerMessageSize, std::to_string(response_msgs_size));

Loading…
Cancel
Save