Dont break codegen barrier

pull/10182/head
Craig Tiller 8 years ago
parent 9a29464d67
commit fa416cbe3b
  1. 5
      include/grpc++/impl/codegen/async_unary_call.h
  2. 1
      include/grpc++/impl/codegen/core_codegen.h
  3. 1
      include/grpc++/impl/codegen/core_codegen_interface.h
  4. 3
      src/cpp/common/core_codegen.cc

@ -42,8 +42,6 @@
#include <grpc++/impl/codegen/service_type.h>
#include <grpc++/impl/codegen/status.h>
extern "C" void* grpc_call_arena_alloc(grpc_call* call, size_t size);
namespace grpc {
class CompletionQueue;
@ -69,7 +67,8 @@ class ClientAsyncResponseReader final
const W& request) {
Call call = channel->CreateCall(method, context, cq);
ClientAsyncResponseReader* reader =
new (grpc_call_arena_alloc(call.call(), sizeof(*reader)))
new (g_core_codegen_interface->grpc_call_arena_alloc(call.call(),
sizeof(*reader)))
ClientAsyncResponseReader(call, context);
reader->init_buf_.SendInitialMetadata(context->send_initial_metadata_,

@ -66,6 +66,7 @@ class CoreCodegen : public CoreCodegenInterface {
void grpc_call_ref(grpc_call* call) override;
void grpc_call_unref(grpc_call* call) override;
virtual void* grpc_call_arena_alloc(grpc_call* call, size_t length) override;
void grpc_byte_buffer_destroy(grpc_byte_buffer* bb) override;

@ -96,6 +96,7 @@ class CoreCodegenInterface {
virtual void grpc_call_ref(grpc_call* call) = 0;
virtual void grpc_call_unref(grpc_call* call) = 0;
virtual void* grpc_call_arena_alloc(grpc_call* call, size_t length) = 0;
virtual grpc_slice grpc_empty_slice() = 0;
virtual grpc_slice grpc_slice_malloc(size_t length) = 0;

@ -93,6 +93,9 @@ void CoreCodegen::grpc_byte_buffer_destroy(grpc_byte_buffer* bb) {
void CoreCodegen::grpc_call_ref(grpc_call* call) { ::grpc_call_ref(call); }
void CoreCodegen::grpc_call_unref(grpc_call* call) { ::grpc_call_unref(call); }
void* CoreCodegen::grpc_call_arena_alloc(grpc_call* call, size_t length) {
return ::grpc_call_arena_alloc(call, length);
}
int CoreCodegen::grpc_byte_buffer_reader_init(grpc_byte_buffer_reader* reader,
grpc_byte_buffer* buffer) {

Loading…
Cancel
Save