Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
c4f4f7ed
Commit
c4f4f7ed
authored
Mar 3, 2016
by
David Garcia Quintas
Browse files
Options
Downloads
Patches
Plain Diff
clang-format
parent
94c80d83
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/grpc++/impl/codegen/proto_utils.h
+7
-6
7 additions, 6 deletions
include/grpc++/impl/codegen/proto_utils.h
src/cpp/proto/proto_serializer.cc
+2
-1
2 additions, 1 deletion
src/cpp/proto/proto_serializer.cc
with
9 additions
and
7 deletions
include/grpc++/impl/codegen/proto_utils.h
+
7
−
6
View file @
c4f4f7ed
...
@@ -83,7 +83,6 @@ class ProtoSerializer : public ProtoSerializerInterface {
...
@@ -83,7 +83,6 @@ class ProtoSerializer : public ProtoSerializerInterface {
int
max_message_size
)
override
;
int
max_message_size
)
override
;
};
};
template
<
class
T
>
template
<
class
T
>
class
SerializationTraits
<
T
,
typename
std
::
enable_if
<
std
::
is_base_of
<
class
SerializationTraits
<
T
,
typename
std
::
enable_if
<
std
::
is_base_of
<
grpc
::
protobuf
::
Message
,
T
>::
value
>::
type
>
{
grpc
::
protobuf
::
Message
,
T
>::
value
>::
type
>
{
...
@@ -92,14 +91,16 @@ class SerializationTraits<T, typename std::enable_if<std::is_base_of<
...
@@ -92,14 +91,16 @@ class SerializationTraits<T, typename std::enable_if<std::is_base_of<
grpc_byte_buffer
**
buffer
,
bool
*
own_buffer
)
{
grpc_byte_buffer
**
buffer
,
bool
*
own_buffer
)
{
*
own_buffer
=
true
;
*
own_buffer
=
true
;
GPR_ASSERT
(
g_proto_serializer
!=
nullptr
&&
GPR_ASSERT
(
g_proto_serializer
!=
nullptr
&&
"No ProtoSerializer instance registered. Make sure grpc++ is being initialized."
);
"No ProtoSerializer instance registered. Make sure grpc++ is "
"being initialized."
);
return
g_proto_serializer
->
SerializeProto
(
msg
,
buffer
);
return
g_proto_serializer
->
SerializeProto
(
msg
,
buffer
);
}
}
static
Status
Deserialize
(
grpc_byte_buffer
*
buffer
,
static
Status
Deserialize
(
grpc_byte_buffer
*
buffer
,
grpc
::
protobuf
::
Message
*
msg
,
grpc
::
protobuf
::
Message
*
msg
,
int
max_message_size
)
{
int
max_message_size
)
{
GPR_ASSERT
(
g_proto_serializer
!=
nullptr
&&
GPR_ASSERT
(
g_proto_serializer
!=
nullptr
&&
"No ProtoSerializer instance registered. Make sure grpc++ is being initialized."
);
"No ProtoSerializer instance registered. Make sure grpc++ is "
"being initialized."
);
auto
status
=
auto
status
=
g_proto_serializer
->
DeserializeProto
(
buffer
,
msg
,
max_message_size
);
g_proto_serializer
->
DeserializeProto
(
buffer
,
msg
,
max_message_size
);
grpc_byte_buffer_destroy
(
buffer
);
grpc_byte_buffer_destroy
(
buffer
);
...
...
This diff is collapsed.
Click to expand it.
src/cpp/proto/proto_serializer.cc
+
2
−
1
View file @
c4f4f7ed
...
@@ -31,7 +31,8 @@
...
@@ -31,7 +31,8 @@
*
*
*/
*/
// TODO(dgq): This file is part of a temporary fix to work around codegen issues related to
// TODO(dgq): This file is part of a temporary fix to work around codegen issues
// related to
// a certain sharp-sounding build system.
// a certain sharp-sounding build system.
// This whole file will be removed in the future.
// This whole file will be removed in the future.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment