Skip to content
Snippets Groups Projects
Commit d35730d1 authored by Vijay Pai's avatar Vijay Pai
Browse files

Fix use of terminal underscores in field names.

parent fc539eb1
No related branches found
No related tags found
No related merge requests found
...@@ -100,13 +100,13 @@ class ClientAsyncResponseReader final ...@@ -100,13 +100,13 @@ class ClientAsyncResponseReader final
: context_(context), : context_(context),
call_(channel->CreateCall(method, context, cq)), call_(channel->CreateCall(method, context, cq)),
collection_(std::make_shared<Ops>()) { collection_(std::make_shared<Ops>()) {
collection_->init_buf_.SetCollection(collection_); collection_->init_buf.SetCollection(collection_);
collection_->init_buf_.SendInitialMetadata( collection_->init_buf.SendInitialMetadata(
context->send_initial_metadata_, context->initial_metadata_flags()); context->send_initial_metadata_, context->initial_metadata_flags());
// TODO(ctiller): don't assert // TODO(ctiller): don't assert
GPR_CODEGEN_ASSERT(collection_->init_buf_.SendMessage(request).ok()); GPR_CODEGEN_ASSERT(collection_->init_buf.SendMessage(request).ok());
collection_->init_buf_.ClientSendClose(); collection_->init_buf.ClientSendClose();
call_.PerformOps(&collection_->init_buf_); call_.PerformOps(&collection_->init_buf);
} }
// always allocated against a call arena, no memory free required // always allocated against a call arena, no memory free required
...@@ -123,18 +123,18 @@ class ClientAsyncResponseReader final ...@@ -123,18 +123,18 @@ class ClientAsyncResponseReader final
void ReadInitialMetadata(void* tag) { void ReadInitialMetadata(void* tag) {
GPR_CODEGEN_ASSERT(!context_->initial_metadata_received_); GPR_CODEGEN_ASSERT(!context_->initial_metadata_received_);
Ops& o = ops; Ops& o = ops_;
// TODO(vjpai): Remove the collection_ specialization as soon // TODO(vjpai): Remove the collection_ specialization as soon
// as the public constructor is deleted // as the public constructor is deleted
if (collection_) { if (collection_) {
o = *collection_; o = *collection_;
collection_->meta_buf_.SetCollection(collection_); collection_->meta_buf.SetCollection(collection_);
} }
o.meta_buf_.set_output_tag(tag); o.meta_buf.set_output_tag(tag);
o.meta_buf_.RecvInitialMetadata(context_); o.meta_buf.RecvInitialMetadata(context_);
call_.PerformOps(&o.meta_buf_); call_.PerformOps(&o.meta_buf);
} }
/// See \a ClientAysncResponseReaderInterface::Finish for semantics. /// See \a ClientAysncResponseReaderInterface::Finish for semantics.
...@@ -143,23 +143,23 @@ class ClientAsyncResponseReader final ...@@ -143,23 +143,23 @@ class ClientAsyncResponseReader final
/// - the \a ClientContext associated with this call is updated with /// - the \a ClientContext associated with this call is updated with
/// possible initial and trailing metadata sent from the server. /// possible initial and trailing metadata sent from the server.
void Finish(R* msg, Status* status, void* tag) { void Finish(R* msg, Status* status, void* tag) {
Ops& o = ops; Ops& o = ops_;
// TODO(vjpai): Remove the collection_ specialization as soon // TODO(vjpai): Remove the collection_ specialization as soon
// as the public constructor is deleted // as the public constructor is deleted
if (collection_) { if (collection_) {
o = *collection_; o = *collection_;
collection_->finish_buf_.SetCollection(collection_); collection_->finish_buf.SetCollection(collection_);
} }
o.finish_buf_.set_output_tag(tag); o.finish_buf.set_output_tag(tag);
if (!context_->initial_metadata_received_) { if (!context_->initial_metadata_received_) {
o.finish_buf_.RecvInitialMetadata(context_); o.finish_buf.RecvInitialMetadata(context_);
} }
o.finish_buf_.RecvMessage(msg); o.finish_buf.RecvMessage(msg);
o.finish_buf_.AllowNoMessage(); o.finish_buf.AllowNoMessage();
o.finish_buf_.ClientRecvStatus(context_, status); o.finish_buf.ClientRecvStatus(context_, status);
call_.PerformOps(&o.finish_buf_); call_.PerformOps(&o.finish_buf);
} }
private: private:
...@@ -169,12 +169,12 @@ class ClientAsyncResponseReader final ...@@ -169,12 +169,12 @@ class ClientAsyncResponseReader final
template <class W> template <class W>
ClientAsyncResponseReader(Call call, ClientContext* context, const W& request) ClientAsyncResponseReader(Call call, ClientContext* context, const W& request)
: context_(context), call_(call) { : context_(context), call_(call) {
ops.init_buf_.SendInitialMetadata(context->send_initial_metadata_, ops_.init_buf.SendInitialMetadata(context->send_initial_metadata_,
context->initial_metadata_flags()); context->initial_metadata_flags());
// TODO(ctiller): don't assert // TODO(ctiller): don't assert
GPR_CODEGEN_ASSERT(ops.init_buf_.SendMessage(request).ok()); GPR_CODEGEN_ASSERT(ops_.init_buf.SendMessage(request).ok());
ops.init_buf_.ClientSendClose(); ops_.init_buf.ClientSendClose();
call_.PerformOps(&ops.init_buf_); call_.PerformOps(&ops_.init_buf);
} }
// disable operator new // disable operator new
...@@ -186,12 +186,12 @@ class ClientAsyncResponseReader final ...@@ -186,12 +186,12 @@ class ClientAsyncResponseReader final
struct Ops : public CallOpSetCollectionInterface { struct Ops : public CallOpSetCollectionInterface {
SneakyCallOpSet<CallOpSendInitialMetadata, CallOpSendMessage, SneakyCallOpSet<CallOpSendInitialMetadata, CallOpSendMessage,
CallOpClientSendClose> CallOpClientSendClose>
init_buf_; init_buf;
CallOpSet<CallOpRecvInitialMetadata> meta_buf_; CallOpSet<CallOpRecvInitialMetadata> meta_buf;
CallOpSet<CallOpRecvInitialMetadata, CallOpRecvMessage<R>, CallOpSet<CallOpRecvInitialMetadata, CallOpRecvMessage<R>,
CallOpClientRecvStatus> CallOpClientRecvStatus>
finish_buf_; finish_buf;
} ops; } ops_;
// TODO(vjpai): Remove the collection_ as soon as the related workaround // TODO(vjpai): Remove the collection_ as soon as the related workaround
// (public constructor) is deleted // (public constructor) is deleted
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment