diff options
author | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2017-04-21 17:05:21 +0000 |
---|---|---|
committer | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2017-04-21 17:05:21 +0000 |
commit | 6228da3fb70247654e387025f83c49b832872212 (patch) | |
tree | f49b73f0d287c9c8418f7e8b543d1bda53400b95 | |
parent | 5a5ccb1bd732e37e008781696ed72a3aea7675dd (diff) | |
download | pcre-6228da3fb70247654e387025f83c49b832872212.tar.gz |
C++ patch to guard 'using std::' directives with namespace pcrecpp.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1697 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | pcre_scanner_unittest.cc | 1 | ||||
-rw-r--r-- | pcre_stringpiece.h.in | 4 | ||||
-rw-r--r-- | pcre_stringpiece_unittest.cc | 1 | ||||
-rw-r--r-- | pcrecpp_unittest.cc | 1 |
5 files changed, 8 insertions, 2 deletions
@@ -42,6 +42,9 @@ length incorrectly, which could result in buffer overflow. 10. Remove redundant line of code (accidentally left in ages ago). +11. Applied C++ patch from Irfan Adilovic to guard 'using std::' directives +with namespace pcrecpp (Bugzilla #2084). + Version 8.40 11-January-2017 ---------------------------- diff --git a/pcre_scanner_unittest.cc b/pcre_scanner_unittest.cc index c00312c..623e2af 100644 --- a/pcre_scanner_unittest.cc +++ b/pcre_scanner_unittest.cc @@ -57,6 +57,7 @@ } while (0) using std::vector; +using std::string; using pcrecpp::StringPiece; using pcrecpp::Scanner; diff --git a/pcre_stringpiece.h.in b/pcre_stringpiece.h.in index eb25826..f54f3f3 100644 --- a/pcre_stringpiece.h.in +++ b/pcre_stringpiece.h.in @@ -52,12 +52,12 @@ #include <pcre.h> +namespace pcrecpp { + using std::memcmp; using std::strlen; using std::string; -namespace pcrecpp { - class PCRECPP_EXP_DEFN StringPiece { private: const char* ptr_; diff --git a/pcre_stringpiece_unittest.cc b/pcre_stringpiece_unittest.cc index 1c4759d..88e73a1 100644 --- a/pcre_stringpiece_unittest.cc +++ b/pcre_stringpiece_unittest.cc @@ -24,6 +24,7 @@ } \ } while (0) +using std::string; using pcrecpp::StringPiece; static void CheckSTLComparator() { diff --git a/pcrecpp_unittest.cc b/pcrecpp_unittest.cc index 92cae8f..4b15fbe 100644 --- a/pcrecpp_unittest.cc +++ b/pcrecpp_unittest.cc @@ -43,6 +43,7 @@ #include <vector> #include "pcrecpp.h" +using std::string; using pcrecpp::StringPiece; using pcrecpp::RE; using pcrecpp::RE_Options; |