Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
brpc
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
brpc
Commits
9dadee8c
Commit
9dadee8c
authored
Jun 20, 2019
by
zhujiashun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Compatible with pb 3.8.0
parent
66578349
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
21 deletions
+8
-21
esp_message.cpp
src/brpc/esp_message.cpp
+2
-4
memcache.cpp
src/brpc/memcache.cpp
+2
-4
nshead_message.cpp
src/brpc/nshead_message.cpp
+1
-4
redis.cpp
src/brpc/redis.cpp
+2
-5
serialized_request.cpp
src/brpc/serialized_request.cpp
+1
-4
No files found.
src/brpc/esp_message.cpp
View file @
9dadee8c
...
...
@@ -14,6 +14,7 @@
#include "esp_message.h"
#include <google/protobuf/reflection_ops.h> // ReflectionOps::Merge
#include <google/protobuf/wire_format.h> // WireFormatLite::GetTagWireType
namespace
brpc
{
...
...
@@ -90,10 +91,7 @@ int EspMessage::ByteSize() const {
void
EspMessage
::
MergeFrom
(
const
::
google
::
protobuf
::
Message
&
from
)
{
GOOGLE_CHECK_NE
(
&
from
,
this
);
const
EspMessage
*
source
=
::
google
::
protobuf
::
internal
::
dynamic_cast_if_available
<
const
EspMessage
*>
(
&
from
);
const
EspMessage
*
source
=
dynamic_cast
<
const
EspMessage
*>
(
&
from
);
if
(
source
==
NULL
)
{
::
google
::
protobuf
::
internal
::
ReflectionOps
::
Merge
(
from
,
this
);
}
else
{
...
...
src/brpc/memcache.cpp
View file @
9dadee8c
...
...
@@ -135,8 +135,7 @@ int MemcacheRequest::ByteSize() const {
void
MemcacheRequest
::
MergeFrom
(
const
::
google
::
protobuf
::
Message
&
from
)
{
GOOGLE_CHECK_NE
(
&
from
,
this
);
const
MemcacheRequest
*
source
=
::
google
::
protobuf
::
internal
::
dynamic_cast_if_available
<
const
MemcacheRequest
*>
(
&
from
);
const
MemcacheRequest
*
source
=
dynamic_cast
<
const
MemcacheRequest
*>
(
&
from
);
if
(
source
==
NULL
)
{
::
google
::
protobuf
::
internal
::
ReflectionOps
::
Merge
(
from
,
this
);
}
else
{
...
...
@@ -264,8 +263,7 @@ int MemcacheResponse::ByteSize() const {
void
MemcacheResponse
::
MergeFrom
(
const
::
google
::
protobuf
::
Message
&
from
)
{
GOOGLE_CHECK_NE
(
&
from
,
this
);
const
MemcacheResponse
*
source
=
::
google
::
protobuf
::
internal
::
dynamic_cast_if_available
<
const
MemcacheResponse
*>
(
&
from
);
const
MemcacheResponse
*
source
=
dynamic_cast
<
const
MemcacheResponse
*>
(
&
from
);
if
(
source
==
NULL
)
{
::
google
::
protobuf
::
internal
::
ReflectionOps
::
Merge
(
from
,
this
);
}
else
{
...
...
src/brpc/nshead_message.cpp
View file @
9dadee8c
...
...
@@ -15,7 +15,6 @@
// Authors: Ge,Jun (gejun@baidu.com)
#include <algorithm>
#include <google/protobuf/generated_message_reflection.h> // dynamic_cast_if_available
#include <google/protobuf/reflection_ops.h> // ReflectionOps::Merge
#include <google/protobuf/wire_format.h>
#include "brpc/nshead_message.h"
...
...
@@ -94,9 +93,7 @@ int NsheadMessage::ByteSize() const {
void
NsheadMessage
::
MergeFrom
(
const
::
google
::
protobuf
::
Message
&
from
)
{
GOOGLE_CHECK_NE
(
&
from
,
this
);
const
NsheadMessage
*
source
=
::
google
::
protobuf
::
internal
::
dynamic_cast_if_available
<
const
NsheadMessage
*>
(
&
from
);
const
NsheadMessage
*
source
=
dynamic_cast
<
const
NsheadMessage
*>
(
&
from
);
if
(
source
==
NULL
)
{
LOG
(
ERROR
)
<<
"Can only merge from NsheadMessage"
;
return
;
...
...
src/brpc/redis.cpp
View file @
9dadee8c
...
...
@@ -14,7 +14,6 @@
// Authors: Ge,Jun (gejun@baidu.com)
#include <google/protobuf/generated_message_reflection.h> // dynamic_cast_if_available
#include <google/protobuf/reflection_ops.h> // ReflectionOps::Merge
#include <gflags/gflags.h>
#include <butil/status.h>
...
...
@@ -89,8 +88,7 @@ int RedisRequest::ByteSize() const {
void
RedisRequest
::
MergeFrom
(
const
::
google
::
protobuf
::
Message
&
from
)
{
GOOGLE_CHECK_NE
(
&
from
,
this
);
const
RedisRequest
*
source
=
::
google
::
protobuf
::
internal
::
dynamic_cast_if_available
<
const
RedisRequest
*>
(
&
from
);
const
RedisRequest
*
source
=
dynamic_cast
<
const
RedisRequest
*>
(
&
from
);
if
(
source
==
NULL
)
{
::
google
::
protobuf
::
internal
::
ReflectionOps
::
Merge
(
from
,
this
);
}
else
{
...
...
@@ -308,8 +306,7 @@ int RedisResponse::ByteSize() const {
void
RedisResponse
::
MergeFrom
(
const
::
google
::
protobuf
::
Message
&
from
)
{
GOOGLE_CHECK_NE
(
&
from
,
this
);
const
RedisResponse
*
source
=
::
google
::
protobuf
::
internal
::
dynamic_cast_if_available
<
const
RedisResponse
*>
(
&
from
);
const
RedisResponse
*
source
=
dynamic_cast
<
const
RedisResponse
*>
(
&
from
);
if
(
source
==
NULL
)
{
::
google
::
protobuf
::
internal
::
ReflectionOps
::
Merge
(
from
,
this
);
}
else
{
...
...
src/brpc/serialized_request.cpp
View file @
9dadee8c
...
...
@@ -14,7 +14,6 @@
// Authors: Ge,Jun (gejun@baidu.com)
#include <google/protobuf/generated_message_reflection.h> // dynamic_cast_if_available
#include "brpc/serialized_request.h"
#include "butil/logging.h"
...
...
@@ -94,9 +93,7 @@ void SerializedRequest::MergeFrom(const SerializedRequest&) {
void
SerializedRequest
::
CopyFrom
(
const
::
google
::
protobuf
::
Message
&
from
)
{
if
(
&
from
==
this
)
return
;
const
SerializedRequest
*
source
=
::
google
::
protobuf
::
internal
::
dynamic_cast_if_available
<
const
SerializedRequest
*>
(
&
from
);
const
SerializedRequest
*
source
=
dynamic_cast
<
const
SerializedRequest
*>
(
&
from
);
if
(
source
==
NULL
)
{
CHECK
(
false
)
<<
"SerializedRequest can only CopyFrom SerializedRequest"
;
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment