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
c049035b
Commit
c049035b
authored
Apr 29, 2016
by
Yuchen Zeng
Browse files
Options
Downloads
Patches
Plain Diff
Add GRPC_ prefix for macros
parent
018bf1a8
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/server_builder_plugin.h
+2
-2
2 additions, 2 deletions
include/grpc++/impl/server_builder_plugin.h
test/cpp/end2end/server_builder_plugin_test.cc
+2
-2
2 additions, 2 deletions
test/cpp/end2end/server_builder_plugin_test.cc
with
4 additions
and
4 deletions
include/grpc++/impl/server_builder_plugin.h
+
2
−
2
View file @
c049035b
...
@@ -64,12 +64,12 @@ class ServerBuilderPlugin {
...
@@ -64,12 +64,12 @@ class ServerBuilderPlugin {
}
// namespace grpc
}
// namespace grpc
#define DECLARE_PLUGIN(plugin_name)
\
#define
GRPC_
DECLARE_PLUGIN(plugin_name) \
namespace sBP##plugin_name { \
namespace sBP##plugin_name { \
extern std::unique_ptr<ServerBuilderPlugin> Create##plugin_name(); \
extern std::unique_ptr<ServerBuilderPlugin> Create##plugin_name(); \
}
}
#define INIT_PLUGIN(map, plugin_name)
\
#define
GRPC_
INIT_PLUGIN(map, plugin_name) \
{ \
{ \
std::unique_ptr<ServerBuilderPlugin> plugin = \
std::unique_ptr<ServerBuilderPlugin> plugin = \
sBP##plugin_name::Create##plugin_name(); \
sBP##plugin_name::Create##plugin_name(); \
...
...
This diff is collapsed.
Click to expand it.
test/cpp/end2end/server_builder_plugin_test.cc
+
2
−
2
View file @
c049035b
...
@@ -147,7 +147,7 @@ class ServerBuilderPluginTest : public ::testing::TestWithParam<bool> {
...
@@ -147,7 +147,7 @@ class ServerBuilderPluginTest : public ::testing::TestWithParam<bool> {
void
InsertPlugin
()
{
void
InsertPlugin
()
{
if
(
GetParam
())
{
if
(
GetParam
())
{
// Add ServerBuilder plugin directly
// Add ServerBuilder plugin directly
INIT_PLUGIN
(
builder_
->
plugins_
,
TestServerBuilderPlugin
);
GRPC_
INIT_PLUGIN
(
builder_
->
plugins_
,
TestServerBuilderPlugin
);
EXPECT_TRUE
(
builder_
->
plugins_
[
PLUGIN_NAME
]
!=
nullptr
);
EXPECT_TRUE
(
builder_
->
plugins_
[
PLUGIN_NAME
]
!=
nullptr
);
}
else
{
}
else
{
// Add ServerBuilder plugin using ServerBuilder::SetOption()
// Add ServerBuilder plugin using ServerBuilder::SetOption()
...
@@ -159,7 +159,7 @@ class ServerBuilderPluginTest : public ::testing::TestWithParam<bool> {
...
@@ -159,7 +159,7 @@ class ServerBuilderPluginTest : public ::testing::TestWithParam<bool> {
void
InsertPluginWithTestService
()
{
void
InsertPluginWithTestService
()
{
if
(
GetParam
())
{
if
(
GetParam
())
{
// Add ServerBuilder plugin directly
// Add ServerBuilder plugin directly
INIT_PLUGIN
(
builder_
->
plugins_
,
TestServerBuilderPlugin
);
GRPC_
INIT_PLUGIN
(
builder_
->
plugins_
,
TestServerBuilderPlugin
);
EXPECT_TRUE
(
builder_
->
plugins_
[
PLUGIN_NAME
]
!=
nullptr
);
EXPECT_TRUE
(
builder_
->
plugins_
[
PLUGIN_NAME
]
!=
nullptr
);
auto
plugin
=
static_cast
<
TestServerBuilderPlugin
*>
(
auto
plugin
=
static_cast
<
TestServerBuilderPlugin
*>
(
builder_
->
plugins_
[
PLUGIN_NAME
].
get
());
builder_
->
plugins_
[
PLUGIN_NAME
].
get
());
...
...
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