wwbmmm commented on a change in pull request #1723:
URL: https://github.com/apache/incubator-brpc/pull/1723#discussion_r837207101



##########
File path: src/brpc/protocol.h
##########
@@ -56,6 +56,15 @@ class InputMessageBase;
 DECLARE_uint64(max_body_size);
 DECLARE_bool(log_error_text);
 
+// Get the serialized byte size of the protobuf message, 
+// different versions of protobuf have different methods
+
+#if GOOGLE_PROTOBUF_VERSION >= 3010000
+#define PROTOBUF_BYTE_SIZE(message) ((message).ByteSizeLong())

Review comment:
       用宏容易产生命名冲突,可以改成inline函数吗




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to