Add GRPC_ prefix for macros

pull/6373/head
Yuchen Zeng 9 years ago
parent 018bf1a864
commit c049035bed
  1. 4
      include/grpc++/impl/server_builder_plugin.h
  2. 4
      test/cpp/end2end/server_builder_plugin_test.cc

@ -64,12 +64,12 @@ class ServerBuilderPlugin {
} // namespace grpc
#define DECLARE_PLUGIN(plugin_name) \
#define GRPC_DECLARE_PLUGIN(plugin_name) \
namespace sBP##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 = \
sBP##plugin_name::Create##plugin_name(); \

@ -147,7 +147,7 @@ class ServerBuilderPluginTest : public ::testing::TestWithParam<bool> {
void InsertPlugin() {
if (GetParam()) {
// Add ServerBuilder plugin directly
INIT_PLUGIN(builder_->plugins_, TestServerBuilderPlugin);
GRPC_INIT_PLUGIN(builder_->plugins_, TestServerBuilderPlugin);
EXPECT_TRUE(builder_->plugins_[PLUGIN_NAME] != nullptr);
} else {
// Add ServerBuilder plugin using ServerBuilder::SetOption()
@ -159,7 +159,7 @@ class ServerBuilderPluginTest : public ::testing::TestWithParam<bool> {
void InsertPluginWithTestService() {
if (GetParam()) {
// Add ServerBuilder plugin directly
INIT_PLUGIN(builder_->plugins_, TestServerBuilderPlugin);
GRPC_INIT_PLUGIN(builder_->plugins_, TestServerBuilderPlugin);
EXPECT_TRUE(builder_->plugins_[PLUGIN_NAME] != nullptr);
auto plugin = static_cast<TestServerBuilderPlugin*>(
builder_->plugins_[PLUGIN_NAME].get());

Loading…
Cancel
Save