diff options
author | Craig Tiller <ctiller@google.com> | 2015-01-13 12:42:17 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2015-01-13 12:42:17 -0800 |
commit | 3d829d8bf465873d6e2902e8fe4eab1c2ea23d5f (patch) | |
tree | 103e28db143a2dcc1d7349a1e4f14c71d8bf5346 /src/cpp/proto | |
parent | cfc18adef72a0849427dec1534fcc6306d1c4257 (diff) | |
parent | dec1a71f91b1a65cf826f1f628fc6b6162728c5c (diff) |
Merge github.com:google/grpc into nogo
Diffstat (limited to 'src/cpp/proto')
-rw-r--r-- | src/cpp/proto/proto_utils.cc | 6 | ||||
-rw-r--r-- | src/cpp/proto/proto_utils.h | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/cpp/proto/proto_utils.cc b/src/cpp/proto/proto_utils.cc index 255d1461a9..3b94dc3c07 100644 --- a/src/cpp/proto/proto_utils.cc +++ b/src/cpp/proto/proto_utils.cc @@ -40,7 +40,8 @@ namespace grpc { -bool SerializeProto(const google::protobuf::Message& msg, grpc_byte_buffer** bp) { +bool SerializeProto(const google::protobuf::Message& msg, + grpc_byte_buffer** bp) { grpc::string msg_str; bool success = msg.SerializeToString(&msg_str); if (success) { @@ -52,7 +53,8 @@ bool SerializeProto(const google::protobuf::Message& msg, grpc_byte_buffer** bp) return success; } -bool DeserializeProto(grpc_byte_buffer* buffer, google::protobuf::Message* msg) { +bool DeserializeProto(grpc_byte_buffer* buffer, + google::protobuf::Message* msg) { grpc::string msg_string; grpc_byte_buffer_reader* reader = grpc_byte_buffer_reader_create(buffer); gpr_slice slice; diff --git a/src/cpp/proto/proto_utils.h b/src/cpp/proto/proto_utils.h index 11471f1acb..ea472f9c51 100644 --- a/src/cpp/proto/proto_utils.h +++ b/src/cpp/proto/proto_utils.h @@ -46,7 +46,8 @@ namespace grpc { // Serialize the msg into a buffer created inside the function. The caller // should destroy the returned buffer when done with it. If serialization fails, // false is returned and buffer is left unchanged. -bool SerializeProto(const google::protobuf::Message& msg, grpc_byte_buffer** buffer); +bool SerializeProto(const google::protobuf::Message& msg, + grpc_byte_buffer** buffer); // The caller keeps ownership of buffer and msg. bool DeserializeProto(grpc_byte_buffer* buffer, google::protobuf::Message* msg); |