diff mbox

[v3] regex versioned namespaces

Message ID 20110314200116.2a8f9e66@shotwell
State New
Headers show

Commit Message

Benjamin Kosnik March 15, 2011, 3:01 a.m. UTC
Ugh. While doing other things I realized that the namespace versioning
for regex header files is off: it's not on the inner-most nested
namespace.

Fixed thusly.

tested x86/linux
tested x86/linux --enable-symvers=gnu-namespace-versioned

-benjamin

Comments

Hans-Peter Nilsson March 15, 2011, 4:18 a.m. UTC | #1
On Mon, 14 Mar 2011, Benjamin Kosnik wrote:
>
> Ugh. While doing other things I realized that the namespace versioning
> for regex header files is off: it's not on the inner-most nested
> namespace.
>
> Fixed thusly.

But it seems like it's not committed?

brgds, H-P
diff mbox

Patch

2011-03-14  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/regex_compiler.h: Nest namespace versioning.
	* include/bits/regex_grep_matcher.tcc: Same.
	* include/bits/regex_grep_matcher.h: Same.
	* include/bits/regex_cursor.h: Same.
	* include/bits/regex_nfa.h: Same.
	* include/bits/regex_nfa.tcc: Same.

	* include/bits/regex_grep_matcher.h: Version forward declarations.
	* include/bits/c++config: Add namespace association for __regex.
	* include/bits/regex.h: Make sub_match consistent.


Index: include/bits/regex_grep_matcher.h
===================================================================
--- include/bits/regex_grep_matcher.h	(revision 170975)
+++ include/bits/regex_grep_matcher.h	(working copy)
@@ -30,12 +30,15 @@ 
 
 namespace std _GLIBCXX_VISIBILITY(default)
 {
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
 
   template<typename _BiIter>
     class sub_match;
 
   template<typename _Bi_iter, typename _Allocator>
     class match_results;
+
+_GLIBCXX_END_NAMESPACE_VERSION
   
 namespace __regex
 {
Index: include/bits/c++config
===================================================================
--- include/bits/c++config	(revision 170975)
+++ include/bits/c++config	(working copy)
@@ -170,9 +170,6 @@ 
 {
   inline namespace _6 { }
 
-  namespace __detail { inline namespace _6 { } }
-
-
   namespace rel_ops { inline namespace _6 { } }
 
   namespace tr1
@@ -189,6 +186,9 @@ 
   namespace placeholders { inline namespace _6 { } }
   namespace regex_constants { inline namespace _6 { } }
   namespace this_thread { inline namespace _6 { } }
+
+  namespace __detail { inline namespace _6 { } }
+  namespace __regex { inline namespace _6 { } }
 }
 
 namespace __gnu_cxx
Index: include/bits/regex.h
===================================================================
--- include/bits/regex.h	(revision 170975)
+++ include/bits/regex.h	(working copy)
@@ -1459,7 +1459,7 @@ 
   template<typename _Bi_iter,
 	   typename _Allocator = allocator<sub_match<_Bi_iter> > >
     class match_results
-    : private std::vector<std::sub_match<_Bi_iter>, _Allocator>
+    : private std::vector<sub_match<_Bi_iter>, _Allocator>
     {
     private:
       /*
@@ -1473,8 +1473,7 @@ 
        * [n+1] prefix
        * [n+2] suffix
        */
-      typedef std::vector<std::sub_match<_Bi_iter>, _Allocator>
-                                                              _Base_type;
+      typedef std::vector<sub_match<_Bi_iter>, _Allocator>    _Base_type;
 
     public:
       /**