You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2020/02/21 23:33:47 UTC

[trafficserver] branch 9.0.x updated: Avoid a weird name collision between HRW and tscore (#6446)

This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/9.0.x by this push:
     new 25289e9  Avoid a weird name collision between HRW and tscore (#6446)
25289e9 is described below

commit 25289e941740638e5cb45084184a85761555d90d
Author: Leif Hedstrom <zw...@apache.org>
AuthorDate: Fri Feb 21 15:33:16 2020 -0800

    Avoid a weird name collision between HRW and tscore (#6446)
    
    (cherry picked from commit 2df57f927f78b6a66c9fbf72c426fca9b6bd4722)
---
 plugins/header_rewrite/header_rewrite_test.cc | 4 ++--
 plugins/header_rewrite/parser.cc              | 2 +-
 plugins/header_rewrite/parser.h               | 8 ++++----
 plugins/header_rewrite/value.cc               | 2 +-
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/plugins/header_rewrite/header_rewrite_test.cc b/plugins/header_rewrite/header_rewrite_test.cc
index cd032f2..704c68d 100644
--- a/plugins/header_rewrite/header_rewrite_test.cc
+++ b/plugins/header_rewrite/header_rewrite_test.cc
@@ -69,10 +69,10 @@ public:
   bool res;
 };
 
-class SimpleTokenizerTest : public SimpleTokenizer
+class SimpleTokenizerTest : public HRWSimpleTokenizer
 {
 public:
-  SimpleTokenizerTest(const std::string &line) : SimpleTokenizer(line), res(true)
+  SimpleTokenizerTest(const std::string &line) : HRWSimpleTokenizer(line), res(true)
   {
     std::cout << "Finished tokenizer test: " << line << std::endl;
   }
diff --git a/plugins/header_rewrite/parser.cc b/plugins/header_rewrite/parser.cc
index 7e5e40e..cb6e2c5 100644
--- a/plugins/header_rewrite/parser.cc
+++ b/plugins/header_rewrite/parser.cc
@@ -248,7 +248,7 @@ Parser::cond_is_hook(TSHttpHookID &hook) const
   return false;
 }
 
-SimpleTokenizer::SimpleTokenizer(const std::string &original_line)
+HRWSimpleTokenizer::HRWSimpleTokenizer(const std::string &original_line)
 {
   std::string line        = original_line;
   ParserState state       = PARSER_DEFAULT;
diff --git a/plugins/header_rewrite/parser.h b/plugins/header_rewrite/parser.h
index 691a817..4b3b468 100644
--- a/plugins/header_rewrite/parser.h
+++ b/plugins/header_rewrite/parser.h
@@ -99,14 +99,14 @@ protected:
   std::vector<std::string> _tokens;
 };
 
-class SimpleTokenizer
+class HRWSimpleTokenizer
 {
 public:
-  explicit SimpleTokenizer(const std::string &line);
+  explicit HRWSimpleTokenizer(const std::string &line);
 
   // noncopyable
-  SimpleTokenizer(const SimpleTokenizer &) = delete;
-  void operator=(const SimpleTokenizer &) = delete;
+  HRWSimpleTokenizer(const HRWSimpleTokenizer &) = delete;
+  void operator=(const HRWSimpleTokenizer &) = delete;
 
   const std::vector<std::string> &
   get_tokens() const
diff --git a/plugins/header_rewrite/value.cc b/plugins/header_rewrite/value.cc
index fc4dcc0..e6c8ddc 100644
--- a/plugins/header_rewrite/value.cc
+++ b/plugins/header_rewrite/value.cc
@@ -44,7 +44,7 @@ Value::set_value(const std::string &val)
   _value = val;
 
   if (_value.find("%{") != std::string::npos) {
-    SimpleTokenizer tokenizer(_value);
+    HRWSimpleTokenizer tokenizer(_value);
     auto tokens = tokenizer.get_tokens();
 
     for (auto token : tokens) {