Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/brpc/memcache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

#include "brpc/memcache.h"

#include <google/protobuf/io/coded_stream.h>
#include "brpc/policy/memcache_binary_header.h"
#include "brpc/proto_base.pb.h"
#include "butil/logging.h"
Expand Down
10 changes: 10 additions & 0 deletions src/brpc/nonreflectable_message.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,19 @@ class NonreflectableMessage : public ::google::protobuf::Message {
#endif

// Size of bytes after serialization.
#if GOOGLE_PROTOBUF_VERSION < 3004000
virtual size_t ByteSizeLong() const {
return 0;
}

int ByteSize() const override {
return static_cast<int>(ByteSizeLong());
}
#else
size_t ByteSizeLong() const override {
return 0;
}
#endif

#if GOOGLE_PROTOBUF_VERSION >= 3007000 && GOOGLE_PROTOBUF_VERSION < 3010000
void SerializeWithCachedSizes(::google::protobuf::io::CodedOutputStream*) const override {}
Expand Down
Loading