You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ma...@apache.org on 2018/05/21 00:53:53 UTC

[trafficserver] branch quic-latest updated (57cf415 -> b42f7d2)

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

masaori pushed a change to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


    from 57cf415  Make PATH_CHALLENGE/RESPONSE frame unprotected
     add 52a9fe9  Fix typo "mutext" to "mutex" in comment
     add a3ef3b0  Get rid of small memory leak in compress plugin.
     add 3591a2f  Fixes some markdown for the CIDR condition
     add ad7a339  MemArena: overhaul internals and clean up API.
     add 1e801bf  Changes to compile on Fedora 28 with gcc 8.1.1
     add 56118f7  Makes the output less debuggy, and other updates
     add 5886b86  Fix issue with test_MemArena.cc which wasn't caught by the PR builds.
     add c615903  Sets things up to find appropriate compilers for C++17
     add 5902b03  Remove some more traffic_cop remenants
     add 2210186  Force using C++17 as the default standard
     add ebd186e  Add the flipped equality/inequality operators with raw pointers to Ptr<>.
     add 172888f  BufferWriter: Formatting tweaks, updated documentation.
     add 5042109  CMakelists.txt: Remove traffic_cop remnants.
     add 5873d80  CID 1383925: Fix null check
     add b969b22  More fixes to the CI builds for C++17
     add c179dfa  Fixes an assert that breaks clang-analyzer
     add 5bf11e4  Added api for ssnid
     add d686e28  Upgrades target autest version to 1.5.3
     add 6e35780  Undoes some damage from clang-tidy on C sources
     add a8dc53f  Removed internal C++14 and C++17 features in ink_std_compat.h
     add 117e92f  Allow better logging by using TSHttpConnectWithPluginId
     add 6a28f4d  IPv6 for microserver and microDNS
     add 6743e2c  Remove TSHttpSsnConnectionGet which seems redundant.
     add a651edc  Adds a couple of more include dirs to vscode
     add 62eac63  Removes all the metrics.config related stuff
     add 5199be1  Fixed memory leak in transform add test, found with clang-analyzer
     add f692c20  Replace ts::string_view with std::string_view
     add b3ad41f  Fix documentation regarding string_view
     add 8530210  Uses known port, not rfc6890 loopback ip
     add d6e75e8  Promote the Escalate plugin to stable
     add 626ad19  Restores the expected non-tab indentations
     add 2172e45  This adds a new callback to remap APIs: TSRemapConfigReload
     add 95dc007  Promotes cache_promote plugin to stable
     add f75f538  Doc: Minor tweaks to clear up doc build errors.
     add 7ecbf9a  Editor: Fix CMakeLists.txt to handle escalate plugin promotion.
     add c0bd0f7  Fix linkage of traffic_manager with WCCP due to removal of metric library.
     add ecb4135  add -F option
     add b737ba0  dump...
     add 74eb527  For TS remap API functions, elaborate on mutual exclusion in the documentation.
     add 6932805  WCCP: Fix issues with gcc8.
     new 6d1a8ee  Merge branch 'asf/master' into quic-latest
     new b42f7d2  Replace ts::string_view with std::string_view in QUIC

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .editorconfig                                      |    4 +
 .gitignore                                         |    9 +-
 .vscode/c_cpp_properties.json                      |   12 +-
 CMakeLists.txt                                     |   23 +-
 build/ax_cxx_compile_stdcxx.m4                     |  980 ------------------
 ci/jenkins/bin/autest.sh                           |   63 +-
 ci/jenkins/bin/build.sh                            |   18 +-
 ci/jenkins/bin/clang-analyzer.sh                   |   22 +-
 ci/jenkins/bin/clang-format.sh                     |    0
 ci/jenkins/bin/coverity.sh                         |    3 +-
 ci/jenkins/bin/docs.sh                             |    0
 ci/jenkins/bin/environment.sh                      |   83 +-
 ci/jenkins/bin/extract.sh                          |    8 +
 ci/jenkins/bin/gh-mirror.sh                        |   44 +-
 ci/jenkins/bin/github.sh                           |   39 +-
 ci/jenkins/bin/rat.sh                              |    2 +-
 ci/jenkins/git-jenkins-setup.sh                    |   22 +-
 ci/jenkins/git-jenkins-update.sh                   |   18 +-
 cmd/traffic_cache_tool/CacheDefs.cc                |    2 +-
 cmd/traffic_cache_tool/File.cc                     |    3 +-
 cmd/traffic_layout/info.cc                         |    2 +-
 cmd/traffic_layout/traffic_layout.cc               |    6 +-
 cmd/traffic_manager/AddConfigFilesHere.cc          |    1 -
 cmd/traffic_manager/Makefile.am                    |   36 +-
 cmd/traffic_manager/metrics.cc                     |  370 -------
 cmd/traffic_manager/metrics.h                      |   36 -
 cmd/traffic_manager/test_metrics.cc                |  115 --
 cmd/traffic_manager/traffic_manager.cc             |   34 +-
 cmd/traffic_via/traffic_via.cc                     |    3 +-
 configure.ac                                       |    5 +-
 doc/admin-guide/files/index.en.rst                 |    4 -
 doc/admin-guide/files/metrics.config.en.rst        |  137 ---
 .../monitoring/statistics/core-statistics.en.rst   |    1 -
 doc/admin-guide/plugins/compress.en.rst            |  108 +-
 doc/admin-guide/plugins/escalate.en.rst            |    9 +-
 doc/admin-guide/plugins/header_rewrite.en.rst      |    8 +-
 doc/admin-guide/plugins/index.en.rst               |   20 +-
 doc/appendices/command-line/traffic_layout.en.rst  |   12 +-
 doc/appendices/command-line/traffic_server.en.rst  |    6 +
 doc/conf.py                                        |   10 +-
 ...TxnIsWebsocket.en.rst => TSHttpSsnIdGet.en.rst} |   13 +-
 doc/developer-guide/api/functions/TSRemap.en.rst   |   13 +-
 doc/developer-guide/api/types/CoreTypes.en.rst     |    8 +
 .../api/types/TSOverridableConfigKey.en.rst        |    1 +
 .../internal-libraries/TextView.en.rst             |    8 +-
 .../internal-libraries/buffer-writer.en.rst        |  855 ++++++++++++---
 .../internal-libraries/index.en.rst                |    1 -
 .../internal-libraries/string_view.en.rst          |   69 --
 doc/manpages.py                                    |    1 -
 example/blacklist_1/blacklist_1.c                  |    2 +-
 .../DelayTransformationPlugin.cc                   |    4 +-
 .../GzipTransformationPlugin.cc                    |    4 +-
 .../NullTransformationPlugin.cc                    |    4 +-
 example/cppapi/post_buffer/PostBuffer.cc           |    4 +-
 example/ssl_preaccept/ssl_preaccept.cc             |   12 +-
 iocore/eventsystem/IOBuffer.cc                     |   74 ++
 iocore/eventsystem/I_MIOBufferWriter.h             |   72 +-
 iocore/eventsystem/I_ProxyAllocator.h              |   25 +-
 iocore/eventsystem/Makefile.am                     |    9 +-
 iocore/eventsystem/ProxyAllocator.cc               |    3 +-
 .../eventsystem/unit-tests/test_MIOBufferWriter.cc |  110 +-
 iocore/hostdb/HostDB.cc                            |    2 -
 iocore/net/I_NetVConnection.h                      |   12 +-
 iocore/net/NetVConnection.cc                       |    4 +-
 iocore/net/P_QUICNetVConnection.h                  |    4 +-
 iocore/net/P_SSLNetVConnection.h                   |    8 +-
 iocore/net/P_SSLUtils.h                            |    4 +-
 iocore/net/P_UnixNetVConnection.h                  |    4 +-
 iocore/net/QUICNetVConnection.cc                   |    7 +-
 iocore/net/SSLNetVConnection.cc                    |   14 +-
 iocore/net/SSLSNIConfig.cc                         |    4 +-
 iocore/net/UnixNet.cc                              |   16 +-
 iocore/net/UnixNetVConnection.cc                   |    6 +-
 iocore/net/quic/QUICHandshakeProtocol.cc           |    1 -
 iocore/net/quic/QUICKeyGenerator.cc                |   16 +-
 lib/bindings/Makefile.am                           |    2 -
 lib/bindings/metrics.cc                            |  259 -----
 lib/bindings/metrics.h                             |   37 -
 lib/cppapi/GzipDeflateTransformation.cc            |    8 +-
 lib/cppapi/GzipInflateTransformation.cc            |    6 +-
 lib/cppapi/TransformationPlugin.cc                 |    4 +-
 .../include/atscppapi/GzipDeflateTransformation.h  |    4 +-
 .../include/atscppapi/GzipInflateTransformation.h  |    4 +-
 .../include/atscppapi/TransformationPlugin.h       |   10 +-
 lib/records/RecHttp.cc                             |    6 +-
 lib/records/RecRawStats.cc                         |    2 +-
 lib/ts/Allocator.h                                 |   49 +-
 lib/ts/BufferWriter.h                              |  259 +++--
 lib/ts/BufferWriterFormat.cc                       |  164 ++-
 lib/ts/BufferWriterForward.h                       |   66 +-
 lib/ts/CryptoHash.h                                |    4 +-
 lib/ts/I_Layout.h                                  |   13 +-
 lib/ts/Layout.cc                                   |   16 +-
 lib/ts/Makefile.am                                 |    8 +-
 lib/ts/MemArena.cc                                 |  174 ++--
 lib/ts/MemArena.h                                  |  192 +++-
 lib/ts/MemSpan.h                                   |   86 +-
 lib/ts/Ptr.h                                       |   33 +
 lib/ts/TextView.h                                  |   20 +-
 mgmt/Cop.h => lib/ts/bwf_std_format.h              |   21 +-
 lib/ts/ink_args.cc                                 |    1 +
 lib/ts/ink_args.h                                  |    1 +
 lib/ts/ink_inet.cc                                 |  312 +++++-
 lib/ts/ink_inet.h                                  |   74 +-
 lib/ts/ink_memory.h                                |   11 +-
 lib/ts/ink_queue.cc                                |   30 +-
 lib/ts/ink_queue.h                                 |   11 +-
 lib/ts/ink_res_init.cc                             |    2 +-
 lib/ts/ink_std_compat.h                            |  157 ---
 lib/ts/ink_string.h                                |   17 +
 lib/ts/mkdfa.c                                     |    4 +-
 lib/ts/signals.cc                                  |    1 +
 lib/ts/string_view.h                               | 1093 --------------------
 lib/ts/test_freelist.cc                            |   17 +-
 lib/ts/unit-tests/test_BufferWriter.cc             |   19 +-
 lib/ts/unit-tests/test_BufferWriterFormat.cc       |   70 +-
 lib/ts/unit-tests/test_MemArena.cc                 |  234 ++---
 lib/ts/unit-tests/test_TextView.cc                 |    5 +-
 lib/ts/unit-tests/test_ink_inet.cc                 |  118 ++-
 lib/ts/unit-tests/test_layout.cc                   |    2 +-
 lib/ts/unit-tests/test_string_view.cc              |  552 ----------
 lib/tsconfig/TsConfigLua.h                         |   85 +-
 lib/wccp/WccpEndPoint.cc                           |    1 -
 lib/wccp/WccpLocal.h                               |   15 +-
 lib/wccp/WccpMsg.cc                                |    2 -
 mgmt/LocalManager.cc                               |    4 +-
 plugins/Makefile.am                                |    4 +-
 plugins/background_fetch/background_fetch.cc       |    2 +-
 .../hipes => cache_promote}/Makefile.inc           |    6 +-
 plugins/{experimental => }/cache_promote/README    |    0
 .../cache_promote/cache_promote.cc                 |    0
 plugins/compress/compress.cc                       |    9 +-
 .../Makefile.am => plugins/escalate/Makefile.inc   |    9 +-
 plugins/{experimental => }/escalate/escalate.cc    |    0
 plugins/experimental/cache_promote/Makefile.inc    |   20 -
 plugins/experimental/escalate/Makefile.inc         |   20 -
 plugins/experimental/mysql_remap/lib/dictionary.h  |    6 +-
 plugins/experimental/mysql_remap/lib/iniparser.h   |    6 +-
 .../ssl_cert_loader/ssl-cert-loader.cc             |   10 +-
 plugins/experimental/sslheaders/sslheaders.cc      |   10 +-
 plugins/experimental/tls_bridge/regex.cc           |    4 +-
 plugins/experimental/tls_bridge/regex.h            |    6 +-
 plugins/experimental/url_sig/url_sig.c             |   17 +-
 .../experimental/webp_transform/ImageTransform.cc  |    6 +-
 plugins/healthchecks/healthchecks.c                |    2 +-
 plugins/tcpinfo/tcpinfo.cc                         |    1 -
 proxy/InkAPI.cc                                    |   43 +-
 proxy/InkAPITest.cc                                |   15 +-
 proxy/Main.cc                                      |    6 +-
 proxy/ParentSelection.cc                           |    4 +-
 proxy/ProxyClientSession.h                         |    6 +-
 proxy/ProxyClientTransaction.h                     |    6 +-
 proxy/ReverseProxy.cc                              |    5 +-
 proxy/api/ts/remap.h                               |    8 +
 proxy/api/ts/ts.h                                  |   10 +-
 proxy/config/Makefile.am                           |    1 -
 proxy/config/metrics.config.default                |   71 --
 proxy/hdrs/HTTP.cc                                 |    2 +-
 proxy/hdrs/URL.cc                                  |    4 +-
 proxy/hdrs/URL.h                                   |    4 +-
 proxy/hq/HQClientSession.cc                        |    2 +-
 proxy/hq/HQClientSession.h                         |    2 +-
 proxy/http/ForwardedConfig.cc                      |    4 +-
 proxy/http/HttpConfig.cc                           |    4 +-
 proxy/http/HttpConfig.h                            |    4 +-
 proxy/http/HttpDebugNames.h                        |   41 +
 proxy/http/HttpProxyServerMain.cc                  |   22 +
 proxy/http/HttpSM.cc                               |   17 +-
 proxy/http/HttpSM.h                                |    8 +-
 proxy/http/HttpServerSession.h                     |    4 +-
 proxy/http/HttpTransactHeaders.cc                  |   31 +-
 proxy/http/HttpTransactHeaders.h                   |    2 +-
 proxy/http/remap/RemapConfig.cc                    |   21 +-
 proxy/http/remap/RemapPluginInfo.cc                |   17 +
 proxy/http/remap/RemapPluginInfo.h                 |    4 +
 proxy/http/unit-tests/test_ForwardedConfig.cc      |    2 +-
 proxy/http2/Http2ClientSession.h                   |    6 +-
 proxy/http2/test_HPACK.cc                          |    7 +-
 proxy/logging/LogHost.cc                           |    4 +-
 proxy/shared/DiagsConfig.cc                        |    1 +
 rc/trafficserver.in                                |    1 -
 rc/trafficserver.service.in                        |    4 +-
 tests/README.md                                    |   47 +-
 tests/bootstrap.py                                 |    2 +-
 tests/gold_tests/autest-site/init.cli.ext          |    2 +-
 tests/gold_tests/autest-site/microDNS.test.ext     |   17 +-
 tests/gold_tests/autest-site/microserver.test.ext  |   29 +-
 .../gold_tests/autest-site/trafficserver.test.ext  |    4 -
 .../headers/general-connection-failure-502.gold    |   14 +-
 .../headers/general-connection-failure-502.test.py |    7 +-
 .../Config.py => lib/IPConstants.py}               |   40 +-
 tests/tools/microDNS/uDNS.py                       |   36 +-
 tests/tools/microServer/uWServer.py                |   16 +-
 tools/jtest/jtest.cc                               |   67 +-
 194 files changed, 3227 insertions(+), 5542 deletions(-)
 delete mode 100644 build/ax_cxx_compile_stdcxx.m4
 mode change 100644 => 100755 ci/jenkins/bin/autest.sh
 mode change 100644 => 100755 ci/jenkins/bin/clang-format.sh
 mode change 100644 => 100755 ci/jenkins/bin/docs.sh
 mode change 100644 => 100755 ci/jenkins/bin/github.sh
 delete mode 100644 cmd/traffic_manager/metrics.cc
 delete mode 100644 cmd/traffic_manager/metrics.h
 delete mode 100644 cmd/traffic_manager/test_metrics.cc
 delete mode 100644 doc/admin-guide/files/metrics.config.en.rst
 copy doc/developer-guide/api/functions/{TSHttpTxnIsWebsocket.en.rst => TSHttpSsnIdGet.en.rst} (74%)
 delete mode 100644 doc/developer-guide/internal-libraries/string_view.en.rst
 delete mode 100644 lib/bindings/metrics.cc
 delete mode 100644 lib/bindings/metrics.h
 copy mgmt/Cop.h => lib/ts/bwf_std_format.h (73%)
 delete mode 100644 lib/ts/ink_std_compat.h
 delete mode 100644 lib/ts/string_view.h
 delete mode 100644 lib/ts/unit-tests/test_string_view.cc
 copy plugins/{experimental/hipes => cache_promote}/Makefile.inc (86%)
 rename plugins/{experimental => }/cache_promote/README (100%)
 rename plugins/{experimental => }/cache_promote/cache_promote.cc (100%)
 copy example/thread_pool/include/Makefile.am => plugins/escalate/Makefile.inc (88%)
 rename plugins/{experimental => }/escalate/escalate.cc (100%)
 delete mode 100644 plugins/experimental/cache_promote/Makefile.inc
 delete mode 100644 plugins/experimental/escalate/Makefile.inc
 delete mode 100644 proxy/config/metrics.config.default
 copy tests/tools/{traffic-replay/Config.py => lib/IPConstants.py} (63%)

-- 
To stop receiving notification emails like this one, please contact
masaori@apache.org.

[trafficserver] 02/02: Replace ts::string_view with std::string_view in QUIC

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

masaori pushed a commit to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit b42f7d27467c6e56be9ae8f9664a55e733e7f38d
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Mon May 21 09:53:09 2018 +0900

    Replace ts::string_view with std::string_view in QUIC
---
 iocore/net/P_QUICNetVConnection.h        |  4 ++--
 iocore/net/QUICNetVConnection.cc         |  7 +++----
 iocore/net/quic/QUICHandshakeProtocol.cc |  1 -
 iocore/net/quic/QUICKeyGenerator.cc      | 16 +++++++++-------
 proxy/hq/HQClientSession.cc              |  2 +-
 proxy/hq/HQClientSession.h               |  2 +-
 6 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/iocore/net/P_QUICNetVConnection.h b/iocore/net/P_QUICNetVConnection.h
index c64e072..8ee8358 100644
--- a/iocore/net/P_QUICNetVConnection.h
+++ b/iocore/net/P_QUICNetVConnection.h
@@ -180,8 +180,8 @@ public:
   virtual void net_read_io(NetHandler *nh, EThread *lthread) override;
   virtual int64_t load_buffer_and_write(int64_t towrite, MIOBufferAccessor &buf, int64_t &total_written, int &needs) override;
 
-  int populate_protocol(ts::string_view *results, int n) const override;
-  const char *protocol_contains(ts::string_view tag) const override;
+  int populate_protocol(std::string_view *results, int n) const override;
+  const char *protocol_contains(std::string_view tag) const override;
 
   // QUICNetVConnection
   void registerNextProtocolSet(SSLNextProtocolSet *s);
diff --git a/iocore/net/QUICNetVConnection.cc b/iocore/net/QUICNetVConnection.cc
index 153b701..30d95a6 100644
--- a/iocore/net/QUICNetVConnection.cc
+++ b/iocore/net/QUICNetVConnection.cc
@@ -24,7 +24,6 @@
 #include <string>
 
 #include "ts/ink_config.h"
-#include "ts/ink_std_compat.h"
 #include "records/I_RecHttp.h"
 #include "ts/Diags.h"
 
@@ -742,7 +741,7 @@ QUICNetVConnection::load_buffer_and_write(int64_t towrite, MIOBufferAccessor &bu
 }
 
 int
-QUICNetVConnection::populate_protocol(ts::string_view *results, int n) const
+QUICNetVConnection::populate_protocol(std::string_view *results, int n) const
 {
   int retval = 0;
   if (n > retval) {
@@ -755,10 +754,10 @@ QUICNetVConnection::populate_protocol(ts::string_view *results, int n) const
 }
 
 const char *
-QUICNetVConnection::protocol_contains(ts::string_view prefix) const
+QUICNetVConnection::protocol_contains(std::string_view prefix) const
 {
   const char *retval  = nullptr;
-  ts::string_view tag = IP_PROTO_TAG_QUIC;
+  std::string_view tag = IP_PROTO_TAG_QUIC;
   if (prefix.size() <= tag.size() && strncmp(tag.data(), prefix.data(), prefix.size()) == 0) {
     retval = tag.data();
   } else {
diff --git a/iocore/net/quic/QUICHandshakeProtocol.cc b/iocore/net/quic/QUICHandshakeProtocol.cc
index cea5d48..8d46370 100644
--- a/iocore/net/quic/QUICHandshakeProtocol.cc
+++ b/iocore/net/quic/QUICHandshakeProtocol.cc
@@ -24,7 +24,6 @@
 #include "QUICHandshakeProtocol.h"
 
 #include "ts/Diags.h"
-#include "ts/string_view.h"
 #include "QUICTypes.h"
 #include "QUICHKDF.h"
 
diff --git a/iocore/net/quic/QUICKeyGenerator.cc b/iocore/net/quic/QUICKeyGenerator.cc
index 3f30a41..5f97b58 100644
--- a/iocore/net/quic/QUICKeyGenerator.cc
+++ b/iocore/net/quic/QUICKeyGenerator.cc
@@ -26,16 +26,18 @@
 #include "ts/ink_assert.h"
 #include "QUICHKDF.h"
 
+using namespace std::literals;
+
 constexpr static uint8_t QUIC_VERSION_1_SALT[] = {
   0x9c, 0x10, 0x8f, 0x98, 0x52, 0x0a, 0x5c, 0x5c, 0x32, 0x96, 0x8e, 0x95, 0x0e, 0x8a, 0x2c, 0x5f, 0xe0, 0x6d, 0x6c, 0x38,
 };
-constexpr static ts::string_view LABEL_FOR_CLIENT_CLEARTEXT_SECRET("client hs"_sv);
-constexpr static ts::string_view LABEL_FOR_SERVER_CLEARTEXT_SECRET("server hs"_sv);
-constexpr static ts::string_view LABEL_FOR_CLIENT_0RTT_SECRET("EXPORTER-QUIC 0rtt"_sv);
-constexpr static ts::string_view LABEL_FOR_CLIENT_PP_SECRET("EXPORTER-QUIC client 1rtt"_sv);
-constexpr static ts::string_view LABEL_FOR_SERVER_PP_SECRET("EXPORTER-QUIC server 1rtt"_sv);
-constexpr static ts::string_view LABEL_FOR_KEY("key"_sv);
-constexpr static ts::string_view LABEL_FOR_IV("iv"_sv);
+constexpr static std::string_view LABEL_FOR_CLIENT_CLEARTEXT_SECRET("client hs"sv);
+constexpr static std::string_view LABEL_FOR_SERVER_CLEARTEXT_SECRET("server hs"sv);
+constexpr static std::string_view LABEL_FOR_CLIENT_0RTT_SECRET("EXPORTER-QUIC 0rtt"sv);
+constexpr static std::string_view LABEL_FOR_CLIENT_PP_SECRET("EXPORTER-QUIC client 1rtt"sv);
+constexpr static std::string_view LABEL_FOR_SERVER_PP_SECRET("EXPORTER-QUIC server 1rtt"sv);
+constexpr static std::string_view LABEL_FOR_KEY("key"sv);
+constexpr static std::string_view LABEL_FOR_IV("iv"sv);
 
 std::unique_ptr<KeyMaterial>
 QUICKeyGenerator::generate(QUICConnectionId cid)
diff --git a/proxy/hq/HQClientSession.cc b/proxy/hq/HQClientSession.cc
index 332bcb0..f946847 100644
--- a/proxy/hq/HQClientSession.cc
+++ b/proxy/hq/HQClientSession.cc
@@ -123,7 +123,7 @@ HQClientSession::release(ProxyClientTransaction *trans)
 }
 
 int
-HQClientSession::populate_protocol(ts::string_view *result, int size) const
+HQClientSession::populate_protocol(std::string_view *result, int size) const
 {
   int retval = 0;
   if (size > retval) {
diff --git a/proxy/hq/HQClientSession.h b/proxy/hq/HQClientSession.h
index ccbae3d..928503f 100644
--- a/proxy/hq/HQClientSession.h
+++ b/proxy/hq/HQClientSession.h
@@ -50,7 +50,7 @@ public:
   int get_transact_count() const override;
   const char *get_protocol_string() const override;
   void release(ProxyClientTransaction *trans) override;
-  int populate_protocol(ts::string_view *result, int size) const override;
+  int populate_protocol(std::string_view *result, int size) const override;
 
   // HQClientSession specific methods
   void add_transaction(HQClientTransaction *);

-- 
To stop receiving notification emails like this one, please contact
masaori@apache.org.

[trafficserver] 01/02: Merge branch 'asf/master' into quic-latest

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

masaori pushed a commit to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 6d1a8eeb03eb3f4d77d903f2593d1fc4c896cf59
Merge: 57cf415 6932805
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Mon May 21 09:35:41 2018 +0900

    Merge branch 'asf/master' into quic-latest
    
    * asf/master: (40 commits)
      WCCP: Fix issues with gcc8.
      For TS remap API functions, elaborate on mutual exclusion in the documentation.
      dump...
      add -F option
      Fix linkage of traffic_manager with WCCP due to removal of metric library.
      Editor: Fix CMakeLists.txt to handle escalate plugin promotion.
      Doc: Minor tweaks to clear up doc build errors.
      Promotes cache_promote plugin to stable
      This adds a new callback to remap APIs: TSRemapConfigReload
      Restores the expected non-tab indentations
      Promote the Escalate plugin to stable
      Uses known port, not rfc6890 loopback ip
      Fix documentation regarding string_view
      Replace ts::string_view with std::string_view
      Fixed memory leak in transform add test, found with clang-analyzer
      Removes all the metrics.config related stuff
      Adds a couple of more include dirs to vscode
      Remove TSHttpSsnConnectionGet which seems redundant.
      IPv6 for microserver and microDNS
      Allow better logging by using TSHttpConnectWithPluginId
      ...
    
     Conflicts:
    	.gitignore
    	lib/ts/Makefile.am
    	lib/ts/ink_inet.cc
    	lib/ts/ink_inet.h
    	lib/tsconfig/TsConfigLua.h

 .editorconfig                                      |    4 +
 .gitignore                                         |    9 +-
 .vscode/c_cpp_properties.json                      |   12 +-
 CMakeLists.txt                                     |   23 +-
 build/ax_cxx_compile_stdcxx.m4                     |  980 ------------------
 ci/jenkins/bin/autest.sh                           |   63 +-
 ci/jenkins/bin/build.sh                            |   18 +-
 ci/jenkins/bin/clang-analyzer.sh                   |   22 +-
 ci/jenkins/bin/clang-format.sh                     |    0
 ci/jenkins/bin/coverity.sh                         |    3 +-
 ci/jenkins/bin/docs.sh                             |    0
 ci/jenkins/bin/environment.sh                      |   83 +-
 ci/jenkins/bin/extract.sh                          |    8 +
 ci/jenkins/bin/gh-mirror.sh                        |   44 +-
 ci/jenkins/bin/github.sh                           |   39 +-
 ci/jenkins/bin/rat.sh                              |    2 +-
 ci/jenkins/git-jenkins-setup.sh                    |   22 +-
 ci/jenkins/git-jenkins-update.sh                   |   18 +-
 cmd/traffic_cache_tool/CacheDefs.cc                |    2 +-
 cmd/traffic_cache_tool/File.cc                     |    3 +-
 cmd/traffic_layout/info.cc                         |    2 +-
 cmd/traffic_layout/traffic_layout.cc               |    6 +-
 cmd/traffic_manager/AddConfigFilesHere.cc          |    1 -
 cmd/traffic_manager/Makefile.am                    |   36 +-
 cmd/traffic_manager/metrics.cc                     |  370 -------
 cmd/traffic_manager/metrics.h                      |   36 -
 cmd/traffic_manager/test_metrics.cc                |  115 --
 cmd/traffic_manager/traffic_manager.cc             |   34 +-
 cmd/traffic_via/traffic_via.cc                     |    3 +-
 configure.ac                                       |    5 +-
 doc/admin-guide/files/index.en.rst                 |    4 -
 doc/admin-guide/files/metrics.config.en.rst        |  137 ---
 .../monitoring/statistics/core-statistics.en.rst   |    1 -
 doc/admin-guide/plugins/compress.en.rst            |  108 +-
 doc/admin-guide/plugins/escalate.en.rst            |    9 +-
 doc/admin-guide/plugins/header_rewrite.en.rst      |    8 +-
 doc/admin-guide/plugins/index.en.rst               |   20 +-
 doc/appendices/command-line/traffic_layout.en.rst  |   12 +-
 doc/appendices/command-line/traffic_server.en.rst  |    6 +
 doc/conf.py                                        |   10 +-
 .../TSHttpSsnIdGet.en.rst}                         |   26 +-
 doc/developer-guide/api/functions/TSRemap.en.rst   |   13 +-
 doc/developer-guide/api/types/CoreTypes.en.rst     |    8 +
 .../api/types/TSOverridableConfigKey.en.rst        |    1 +
 .../internal-libraries/TextView.en.rst             |    8 +-
 .../internal-libraries/buffer-writer.en.rst        |  855 ++++++++++++---
 .../internal-libraries/index.en.rst                |    1 -
 .../internal-libraries/string_view.en.rst          |   69 --
 doc/manpages.py                                    |    1 -
 example/blacklist_1/blacklist_1.c                  |    2 +-
 .../DelayTransformationPlugin.cc                   |    4 +-
 .../GzipTransformationPlugin.cc                    |    4 +-
 .../NullTransformationPlugin.cc                    |    4 +-
 example/cppapi/post_buffer/PostBuffer.cc           |    4 +-
 example/ssl_preaccept/ssl_preaccept.cc             |   12 +-
 iocore/eventsystem/IOBuffer.cc                     |   74 ++
 iocore/eventsystem/I_MIOBufferWriter.h             |   72 +-
 iocore/eventsystem/I_ProxyAllocator.h              |   25 +-
 iocore/eventsystem/Makefile.am                     |    9 +-
 iocore/eventsystem/ProxyAllocator.cc               |    3 +-
 .../eventsystem/unit-tests/test_MIOBufferWriter.cc |  110 +-
 iocore/hostdb/HostDB.cc                            |    2 -
 iocore/net/I_NetVConnection.h                      |   12 +-
 iocore/net/NetVConnection.cc                       |    4 +-
 iocore/net/P_SSLNetVConnection.h                   |    8 +-
 iocore/net/P_SSLUtils.h                            |    4 +-
 iocore/net/P_UnixNetVConnection.h                  |    4 +-
 iocore/net/SSLNetVConnection.cc                    |   14 +-
 iocore/net/SSLSNIConfig.cc                         |    4 +-
 iocore/net/UnixNet.cc                              |   16 +-
 iocore/net/UnixNetVConnection.cc                   |    6 +-
 lib/bindings/Makefile.am                           |    2 -
 lib/bindings/metrics.cc                            |  259 -----
 lib/bindings/metrics.h                             |   37 -
 lib/cppapi/GzipDeflateTransformation.cc            |    8 +-
 lib/cppapi/GzipInflateTransformation.cc            |    6 +-
 lib/cppapi/TransformationPlugin.cc                 |    4 +-
 .../include/atscppapi/GzipDeflateTransformation.h  |    4 +-
 .../include/atscppapi/GzipInflateTransformation.h  |    4 +-
 .../include/atscppapi/TransformationPlugin.h       |   10 +-
 lib/records/RecHttp.cc                             |    6 +-
 lib/records/RecRawStats.cc                         |    2 +-
 lib/ts/Allocator.h                                 |   49 +-
 lib/ts/BufferWriter.h                              |  259 +++--
 lib/ts/BufferWriterFormat.cc                       |  164 ++-
 lib/ts/BufferWriterForward.h                       |   66 +-
 lib/ts/CryptoHash.h                                |    4 +-
 lib/ts/I_Layout.h                                  |   13 +-
 lib/ts/Layout.cc                                   |   16 +-
 lib/ts/Makefile.am                                 |    8 +-
 lib/ts/MemArena.cc                                 |  174 ++--
 lib/ts/MemArena.h                                  |  192 +++-
 lib/ts/MemSpan.h                                   |   86 +-
 lib/ts/Ptr.h                                       |   33 +
 lib/ts/TextView.h                                  |   20 +-
 lib/ts/bwf_std_format.h                            |   36 +
 lib/ts/ink_args.cc                                 |    1 +
 lib/ts/ink_args.h                                  |    1 +
 lib/ts/ink_inet.cc                                 |  312 +++++-
 lib/ts/ink_inet.h                                  |   74 +-
 lib/ts/ink_memory.h                                |   11 +-
 lib/ts/ink_queue.cc                                |   30 +-
 lib/ts/ink_queue.h                                 |   11 +-
 lib/ts/ink_res_init.cc                             |    2 +-
 lib/ts/ink_std_compat.h                            |  157 ---
 lib/ts/ink_string.h                                |   17 +
 lib/ts/mkdfa.c                                     |    4 +-
 lib/ts/signals.cc                                  |    1 +
 lib/ts/string_view.h                               | 1093 --------------------
 lib/ts/test_freelist.cc                            |   17 +-
 lib/ts/unit-tests/test_BufferWriter.cc             |   19 +-
 lib/ts/unit-tests/test_BufferWriterFormat.cc       |   70 +-
 lib/ts/unit-tests/test_MemArena.cc                 |  234 ++---
 lib/ts/unit-tests/test_TextView.cc                 |    5 +-
 lib/ts/unit-tests/test_ink_inet.cc                 |  118 ++-
 lib/ts/unit-tests/test_layout.cc                   |    2 +-
 lib/ts/unit-tests/test_string_view.cc              |  552 ----------
 lib/tsconfig/TsConfigLua.h                         |   85 +-
 lib/wccp/WccpEndPoint.cc                           |    1 -
 lib/wccp/WccpLocal.h                               |   15 +-
 lib/wccp/WccpMsg.cc                                |    2 -
 mgmt/LocalManager.cc                               |    4 +-
 plugins/Makefile.am                                |    4 +-
 plugins/background_fetch/background_fetch.cc       |    2 +-
 .../escalate => cache_promote}/Makefile.inc        |    6 +-
 plugins/{experimental => }/cache_promote/README    |    0
 .../cache_promote/cache_promote.cc                 |    0
 plugins/compress/compress.cc                       |    9 +-
 .../cache_promote => escalate}/Makefile.inc        |    6 +-
 plugins/{experimental => }/escalate/escalate.cc    |    0
 plugins/experimental/mysql_remap/lib/dictionary.h  |    6 +-
 plugins/experimental/mysql_remap/lib/iniparser.h   |    6 +-
 .../ssl_cert_loader/ssl-cert-loader.cc             |   10 +-
 plugins/experimental/sslheaders/sslheaders.cc      |   10 +-
 plugins/experimental/tls_bridge/regex.cc           |    4 +-
 plugins/experimental/tls_bridge/regex.h            |    6 +-
 plugins/experimental/url_sig/url_sig.c             |   17 +-
 .../experimental/webp_transform/ImageTransform.cc  |    6 +-
 plugins/healthchecks/healthchecks.c                |    2 +-
 plugins/tcpinfo/tcpinfo.cc                         |    1 -
 proxy/InkAPI.cc                                    |   43 +-
 proxy/InkAPITest.cc                                |   15 +-
 proxy/Main.cc                                      |    6 +-
 proxy/ParentSelection.cc                           |    4 +-
 proxy/ProxyClientSession.h                         |    6 +-
 proxy/ProxyClientTransaction.h                     |    6 +-
 proxy/ReverseProxy.cc                              |    5 +-
 proxy/api/ts/remap.h                               |    8 +
 proxy/api/ts/ts.h                                  |   10 +-
 proxy/config/Makefile.am                           |    1 -
 proxy/config/metrics.config.default                |   71 --
 proxy/hdrs/HTTP.cc                                 |    2 +-
 proxy/hdrs/URL.cc                                  |    4 +-
 proxy/hdrs/URL.h                                   |    4 +-
 proxy/http/ForwardedConfig.cc                      |    4 +-
 proxy/http/HttpConfig.cc                           |    4 +-
 proxy/http/HttpConfig.h                            |    4 +-
 proxy/http/HttpDebugNames.h                        |   41 +
 proxy/http/HttpProxyServerMain.cc                  |   22 +
 proxy/http/HttpSM.cc                               |   17 +-
 proxy/http/HttpSM.h                                |    8 +-
 proxy/http/HttpServerSession.h                     |    4 +-
 proxy/http/HttpTransactHeaders.cc                  |   31 +-
 proxy/http/HttpTransactHeaders.h                   |    2 +-
 proxy/http/remap/RemapConfig.cc                    |   21 +-
 proxy/http/remap/RemapPluginInfo.cc                |   17 +
 proxy/http/remap/RemapPluginInfo.h                 |    4 +
 proxy/http/unit-tests/test_ForwardedConfig.cc      |    2 +-
 proxy/http2/Http2ClientSession.h                   |    6 +-
 proxy/http2/test_HPACK.cc                          |    7 +-
 proxy/logging/LogHost.cc                           |    4 +-
 proxy/shared/DiagsConfig.cc                        |    1 +
 rc/trafficserver.in                                |    1 -
 rc/trafficserver.service.in                        |    4 +-
 tests/README.md                                    |   47 +-
 tests/bootstrap.py                                 |    2 +-
 tests/gold_tests/autest-site/init.cli.ext          |    2 +-
 tests/gold_tests/autest-site/microDNS.test.ext     |   17 +-
 tests/gold_tests/autest-site/microserver.test.ext  |   29 +-
 .../gold_tests/autest-site/trafficserver.test.ext  |    4 -
 .../headers/general-connection-failure-502.gold    |   14 +-
 .../headers/general-connection-failure-502.test.py |    7 +-
 .../Makefile.am => tests/tools/lib/IPConstants.py  |   48 +-
 tests/tools/microDNS/uDNS.py                       |   36 +-
 tests/tools/microServer/uWServer.py                |   16 +-
 tools/jtest/jtest.cc                               |   67 +-
 186 files changed, 3244 insertions(+), 5486 deletions(-)

diff --cc .gitignore
index 19ef8bd,9a9f5ec..5514f1c
--- a/.gitignore
+++ b/.gitignore
@@@ -60,6 -58,6 +58,7 @@@ cmd/traffic_layout/traffic_layou
  cmd/traffic_via/traffic_via
  cmd/traffic_wccp/traffic_wccp
  cmd/traffic_cache_tool/traffic_cache_tool
++cmd/traffic_quic/traffic_quic
  
  lib/stamp-h1
  lib/ink_autoconf.h
diff --cc lib/ts/Makefile.am
index 4175d8a,fead563..b3d9915
--- a/lib/ts/Makefile.am
+++ b/lib/ts/Makefile.am
@@@ -212,17 -210,7 +210,18 @@@ libtsutil_la_SOURCES = 
  	X509HostnameValidator.cc \
  	X509HostnameValidator.h
  
 +if HAS_HKDF
 +if OPENSSL_IS_BORINGSSL
 +HKDF_impl = HKDF_boringssl.cc
 +else
 +HKDF_impl = HKDF_openssl.cc
 +endif
 +libtsutil_la_SOURCES += \
 +  HKDF.h \
 +  $(HKDF_impl)
 +endif
 +
+ BufferWriterFormat.o : AM_CPPFLAGS += -Wno-char-subscripts
  
  #test_UNUSED_SOURCES = \
  #  load_http_hdr.cc \
@@@ -285,14 -273,8 +284,13 @@@ test_tslib_SOURCES = 
  	unit-tests/test_MemArena.cc \
  	unit-tests/test_MT_hashtable.cc \
  	unit-tests/test_Scalar.cc \
- 	unit-tests/test_string_view.cc \
  	unit-tests/test_scoped_resource.cc \
--	unit-tests/test_TextView.cc 
++	unit-tests/test_TextView.cc
 +
 +if HAS_HKDF
 +test_tslib_SOURCES += \
 +	unit-tests/test_HKDF.cc
 +endif
  
  CompileParseRules_SOURCES = CompileParseRules.cc
  
diff --cc lib/ts/ink_inet.cc
index a36beff,4b02280..b1b4d92
--- a/lib/ts/ink_inet.cc
+++ b/lib/ts/ink_inet.cc
@@@ -36,20 -36,20 +36,22 @@@
  
  IpAddr const IpAddr::INVALID;
  
- const ts::string_view IP_PROTO_TAG_IPV4("ipv4"_sv);
- const ts::string_view IP_PROTO_TAG_IPV6("ipv6"_sv);
- const ts::string_view IP_PROTO_TAG_UDP("udp"_sv);
- const ts::string_view IP_PROTO_TAG_TCP("tcp"_sv);
- const ts::string_view IP_PROTO_TAG_QUIC("quic"_sv);
- const ts::string_view IP_PROTO_TAG_TLS_1_0("tls/1.0"_sv);
- const ts::string_view IP_PROTO_TAG_TLS_1_1("tls/1.1"_sv);
- const ts::string_view IP_PROTO_TAG_TLS_1_2("tls/1.2"_sv);
- const ts::string_view IP_PROTO_TAG_TLS_1_3("tls/1.3"_sv);
- const ts::string_view IP_PROTO_TAG_HTTP_0_9("http/0.9"_sv);
- const ts::string_view IP_PROTO_TAG_HTTP_1_0("http/1.0"_sv);
- const ts::string_view IP_PROTO_TAG_HTTP_1_1("http/1.1"_sv);
- const ts::string_view IP_PROTO_TAG_HTTP_2_0("h2"_sv);     // HTTP/2 over TLS
- const ts::string_view IP_PROTO_TAG_HTTP_QUIC("hq-11"_sv); // HTTP over QUIC
+ using namespace std::literals;
+ 
+ const std::string_view IP_PROTO_TAG_IPV4("ipv4"sv);
+ const std::string_view IP_PROTO_TAG_IPV6("ipv6"sv);
+ const std::string_view IP_PROTO_TAG_UDP("udp"sv);
+ const std::string_view IP_PROTO_TAG_TCP("tcp"sv);
++const std::string_view IP_PROTO_TAG_QUIC("quic"sv);
+ const std::string_view IP_PROTO_TAG_TLS_1_0("tls/1.0"sv);
+ const std::string_view IP_PROTO_TAG_TLS_1_1("tls/1.1"sv);
+ const std::string_view IP_PROTO_TAG_TLS_1_2("tls/1.2"sv);
+ const std::string_view IP_PROTO_TAG_TLS_1_3("tls/1.3"sv);
+ const std::string_view IP_PROTO_TAG_HTTP_0_9("http/0.9"sv);
+ const std::string_view IP_PROTO_TAG_HTTP_1_0("http/1.0"sv);
+ const std::string_view IP_PROTO_TAG_HTTP_1_1("http/1.1"sv);
 -const std::string_view IP_PROTO_TAG_HTTP_2_0("h2"sv); // HTTP/2 over TLS
++const std::string_view IP_PROTO_TAG_HTTP_2_0("h2"sv);     // HTTP/2 over TLS
++const std::string_view IP_PROTO_TAG_HTTP_QUIC("hq-11"sv); // HTTP over QUIC
  
  uint32_t
  ink_inet_addr(const char *s)
diff --cc lib/ts/ink_inet.h
index c06fb5e,a0e74a6..cf89506
--- a/lib/ts/ink_inet.h
+++ b/lib/ts/ink_inet.h
@@@ -44,20 -46,18 +46,20 @@@ IN6_IS_ADDR_UNSPECIFIED(in6_addr const 
  #endif
  
  // IP protocol stack tags.
- extern const ts::string_view IP_PROTO_TAG_IPV4;
- extern const ts::string_view IP_PROTO_TAG_IPV6;
- extern const ts::string_view IP_PROTO_TAG_UDP;
- extern const ts::string_view IP_PROTO_TAG_TCP;
- extern const ts::string_view IP_PROTO_TAG_QUIC;
- extern const ts::string_view IP_PROTO_TAG_TLS_1_0;
- extern const ts::string_view IP_PROTO_TAG_TLS_1_1;
- extern const ts::string_view IP_PROTO_TAG_TLS_1_2;
- extern const ts::string_view IP_PROTO_TAG_TLS_1_3;
- extern const ts::string_view IP_PROTO_TAG_HTTP_0_9;
- extern const ts::string_view IP_PROTO_TAG_HTTP_1_0;
- extern const ts::string_view IP_PROTO_TAG_HTTP_1_1;
- extern const ts::string_view IP_PROTO_TAG_HTTP_2_0;
- extern const ts::string_view IP_PROTO_TAG_HTTP_QUIC;
+ extern const std::string_view IP_PROTO_TAG_IPV4;
+ extern const std::string_view IP_PROTO_TAG_IPV6;
+ extern const std::string_view IP_PROTO_TAG_UDP;
+ extern const std::string_view IP_PROTO_TAG_TCP;
++extern const std::string_view IP_PROTO_TAG_QUIC;
+ extern const std::string_view IP_PROTO_TAG_TLS_1_0;
+ extern const std::string_view IP_PROTO_TAG_TLS_1_1;
+ extern const std::string_view IP_PROTO_TAG_TLS_1_2;
+ extern const std::string_view IP_PROTO_TAG_TLS_1_3;
+ extern const std::string_view IP_PROTO_TAG_HTTP_0_9;
+ extern const std::string_view IP_PROTO_TAG_HTTP_1_0;
+ extern const std::string_view IP_PROTO_TAG_HTTP_1_1;
+ extern const std::string_view IP_PROTO_TAG_HTTP_2_0;
++extern const std::string_view IP_PROTO_TAG_HTTP_QUIC;
  
  struct IpAddr; // forward declare.
  
diff --cc lib/tsconfig/TsConfigLua.h
index a0196a2,8edfcf2..97024de
--- a/lib/tsconfig/TsConfigLua.h
+++ b/lib/tsconfig/TsConfigLua.h
@@@ -89,107 -89,96 +89,96 @@@ class TsConfigBase 
  public:
    /// Source of the value in the config struct.
    enum class Source {
 -    NONE, ///< No source, the value is default constructed.
 +    NONE,   ///< No source, the value is default constructed.
      SCHEMA, ///< Value set in schema.
 -    CONFIG ///< Value set in configuration file.
 +    CONFIG  ///< Value set in configuration file.
    };
    /// Constructor - need the static descriptor.
 -  TsConfigBase(TsConfigDescriptor const& d) : descriptor(d) {}
 -  TsConfigDescriptor const& descriptor; ///< Static schema data.
 -  Source source = Source::NONE; ///< Where the instance data came from.
 +  TsConfigBase(TsConfigDescriptor const &d) : descriptor(d) {}
 +  TsConfigDescriptor const &descriptor; ///< Static schema data.
 +  Source source = Source::NONE;         ///< Where the instance data came from.
-   virtual ~TsConfigBase() {}
+   virtual ~TsConfigBase()
+   {}
    /// Load the instance data from the Lua stack.
 -  virtual ts::Errata loader(lua_State* s) = 0;
 +  virtual ts::Errata loader(lua_State *s) = 0;
  };
  
- class TsConfigInt : public TsConfigBase
- {
+ class TsConfigInt : public TsConfigBase {
  public:
 -   TsConfigInt(TsConfigDescriptor const& d, int& i):TsConfigBase(d),ref(i){}
 -   ts::Errata loader(lua_State* s) override;
 +  TsConfigInt(TsConfigDescriptor const &d, int &i) : TsConfigBase(d), ref(i) {}
 +  ts::Errata loader(lua_State *s) override;
- 
  private:
 -   int & ref;
 +  int &ref;
  };
  
- class TsConfigBool : public TsConfigBase
- {
+ class TsConfigBool : public TsConfigBase {
  public:
 -    TsConfigBool(TsConfigDescriptor const& d, bool& i):TsConfigBase(d), ref(i) {}
 -    ts::Errata loader(lua_State* s) override;
 -private:
 -    bool &ref;
 +  TsConfigBool(TsConfigDescriptor const &d, bool &i) : TsConfigBase(d), ref(i) {}
 +  ts::Errata loader(lua_State *s) override;
  
 +private:
 +  bool &ref;
  };
  
- class TsConfigString : public TsConfigBase
- {
+ class TsConfigString : public TsConfigBase {
  public:
 -   TsConfigString(TsConfigDescriptor const& d, std::string& str) : TsConfigBase(d), ref(str) {}
 -//    TsConfigString& operator= (const TsConfigString& other)
 -//    {
 -//        ref = other.ref;
 -//        return *this;
 -//    }
 -   ts::Errata loader(lua_State* s) override;
 +  TsConfigString(TsConfigDescriptor const &d, std::string &str) : TsConfigBase(d), ref(str) {}
 +  //    TsConfigString& operator= (const TsConfigString& other)
 +  //    {
 +  //        ref = other.ref;
 +  //        return *this;
 +  //    }
 +  ts::Errata loader(lua_State *s) override;
- 
  private:
 -   std::string& ref;
 +  std::string &ref;
  };
  
- class TsConfigArrayDescriptor : public TsConfigDescriptor
- {
+ 
+ 
+ class TsConfigArrayDescriptor : public TsConfigDescriptor {
  public:
 -   TsConfigArrayDescriptor(TsConfigDescriptor const& d) : item(d) {}
 -   const TsConfigDescriptor& item;
 +  TsConfigArrayDescriptor(TsConfigDescriptor const &d) : item(d) {}
 +  const TsConfigDescriptor &item;
  };
  
- class TsConfigEnumDescriptor : public TsConfigDescriptor
- {
+ class TsConfigEnumDescriptor : public TsConfigDescriptor {
 -  using self_type = TsConfigEnumDescriptor;
 +  using self_type  = TsConfigEnumDescriptor;
    using super_type = TsConfigDescriptor;
- 
  public:
-   struct Pair {
-     ts::string_view key;
-     int value;
-   };
-   TsConfigEnumDescriptor(Type t, ts::string_view t_name, ts::string_view n, ts::string_view d, std::initializer_list<Pair> pairs)
+   struct Pair { std::string_view key; int value; };
+  TsConfigEnumDescriptor(Type t, std::string_view t_name, std::string_view n, std::string_view d, std::initializer_list<Pair> pairs)
      : super_type{t, t_name, n, d}, values{pairs.size(), &TsLuaConfigSVHash}, keys{pairs.size()}
    {
 -    for ( auto& p : pairs ) {
 +    for (auto &p : pairs) {
        values[p.key] = p.value;
        keys[p.value] = p.key;
      }
    }
-   std::unordered_map<ts::string_view, int, size_t (*)(ts::string_view const &)> values;
-   std::unordered_map<int, ts::string_view> keys;
-   int
-   get(ts::string_view key)
+   std::unordered_map<std::string_view, int, size_t(*)(std::string_view const&) > values;
+   std::unordered_map<int, std::string_view> keys;
+   int get(std::string_view key)
    {
 -      return values[key];
 +    return values[key];
    }
  };
  
- class TsConfigObjectDescriptor : public TsConfigDescriptor
- {
+ class TsConfigObjectDescriptor : public TsConfigDescriptor {
 -   std::unordered_map<std::string, TsConfigDescriptor const*> fields;
 +  std::unordered_map<std::string, TsConfigDescriptor const *> fields;
  };
  
- template <typename E> class TsConfigEnum : public TsConfigBase
- {
 -template < typename E >
 -class TsConfigEnum : public TsConfigBase {
++template <typename E> class TsConfigEnum : public TsConfigBase {
  public:
 -   TsConfigEnum(TsConfigEnumDescriptor const& d, int& i) : TsConfigBase(d),edescriptor(d), ref(i) {}
 -   TsConfigEnumDescriptor edescriptor;
 -   int& ref;
 -   ts::Errata loader(lua_State* L) override
 -   {
 +  TsConfigEnum(TsConfigEnumDescriptor const &d, int &i) : TsConfigBase(d), edescriptor(d), ref(i) {}
 +  TsConfigEnumDescriptor edescriptor;
 +  int &ref;
 +  ts::Errata
 +  loader(lua_State *L) override
 +  {
      ts::Errata zret;
-     std::string key(lua_tostring(L, -1));
-     ref = edescriptor.get(ts::string_view(key));
+     std::string key(lua_tostring(L,-1));
+     ref = edescriptor.get(std::string_view(key));
      return zret;
 -    }
 +  }
  };
  
  #endif /* TSCONFIGLUA_H */

-- 
To stop receiving notification emails like this one, please contact
masaori@apache.org.