Attached patch applied:
2011-07-21 François Dumont
* include/debug/safe_unordered_sequence.h,
safe_unordered_sequence.tcc: Rename respectively in...
* include/debug/safe_unordered_container.h,
safe_unordered_container.tcc: ...those. _Safe_unordered_sequence
rename _Safe_unordered_container.
* include/debug/safe_unordered_base.h:
_Safe_unordered_sequence_base
rename _Safe_unordered_container_base.
* include/debug/unordered_map, unordered_set: Adapt to previous
modifications.
* config/abi/pre/gnu.ver: Likewise.
* src/debug.cc: Likewise.
* include/Makefile.am: Likewise.
* include/Makefile.in: Regenerate.
Regards
On 07/21/2011 12:58 AM, Jonathan Wakely wrote:
On 20 July 2011 22:40, Paolo Carlini wrote:
On 07/20/2011 10:46 PM, François Dumont wrote:
Hello
Sorry for the inconvenience. Here is my proposition for the renaming, I
I should probably apologise for the inconvenience for suggesting
changing it! I do think it is a bit confusing though, the "Sequence"
containers in the standard library have a definite ordering, so an
unordered sequence is confusing :)
haven't tested it yet but will of course before commiting.
I'm Ok with it if Jonathan is...
Yes, thanks for changing it.
Thanks,
Paolo.
PS: my first language obviously isn't English, but I see you are using
a lot where I would normally prefer...
Yes, proposal would be correct there.
Index: src/debug.cc
===
--- src/debug.cc (revision 176533)
+++ src/debug.cc (working copy)
@@ -25,7 +25,7 @@
#include
#include
-#include
+#include
#include
#include
#include
@@ -78,8 +78,8 @@
}
void
- swap_useq(__gnu_debug::_Safe_unordered_sequence_base& __lhs,
- __gnu_debug::_Safe_unordered_sequence_base& __rhs)
+ swap_ucont(__gnu_debug::_Safe_unordered_container_base& __lhs,
+ __gnu_debug::_Safe_unordered_container_base& __rhs)
{
swap_seq(__lhs, __rhs);
swap_its(__lhs, __lhs._M_local_iterators,
@@ -174,8 +174,8 @@
" by a dereferenceable one",
"function requires a valid iterator range (%2.name;, %3.name;)"
", \"%2.name;\" shall be before and not equal to \"%3.name;\"",
-// std::unordered_sequence::local_iterator
-"attempt to compare local iterators from different unordered sequence"
+// std::unordered_container::local_iterator
+"attempt to compare local iterators from different unordered container"
" buckets"
};
@@ -374,38 +374,38 @@
_M_get_mutex() throw ()
{ return get_safe_base_mutex(_M_sequence); }
- _Safe_unordered_sequence_base*
+ _Safe_unordered_container_base*
_Safe_local_iterator_base::
- _M_get_sequence() const _GLIBCXX_NOEXCEPT
- { return static_cast<_Safe_unordered_sequence_base*>(_M_sequence); }
+ _M_get_container() const _GLIBCXX_NOEXCEPT
+ { return static_cast<_Safe_unordered_container_base*>(_M_sequence); }
void
_Safe_local_iterator_base::
- _M_attach(_Safe_sequence_base* __seq, bool __constant)
+ _M_attach(_Safe_sequence_base* __cont, bool __constant)
{
_M_detach();
-// Attach to the new sequence (if there is one)
-if (__seq)
+// Attach to the new container (if there is one)
+if (__cont)
{
- _M_sequence = __seq;
+ _M_sequence = __cont;
_M_version = _M_sequence->_M_version;
- _M_get_sequence()->_M_attach_local(this, __constant);
+ _M_get_container()->_M_attach_local(this, __constant);
}
}
void
_Safe_local_iterator_base::
- _M_attach_single(_Safe_sequence_base* __seq, bool __constant) throw ()
+ _M_attach_single(_Safe_sequence_base* __cont, bool __constant) throw ()
{
_M_detach_single();
-// Attach to the new sequence (if there is one)
-if (__seq)
+// Attach to the new container (if there is one)
+if (__cont)
{
- _M_sequence = __seq;
+ _M_sequence = __cont;
_M_version = _M_sequence->_M_version;
- _M_get_sequence()->_M_attach_local_single(this, __constant);
+ _M_get_container()->_M_attach_local_single(this, __constant);
}
}
@@ -414,7 +414,7 @@
_M_detach()
{
if (_M_sequence)
- _M_get_sequence()->_M_detach_local(this);
+ _M_get_container()->_M_detach_local(this);
_M_reset();
}
@@ -424,13 +424,13 @@
_M_detach_single() throw ()
{
if (_M_sequence)
- _M_get_sequence()->_M_detach_local_single(this);
+ _M_get_container()->_M_detach_local_single(this);
_M_reset();
}
void
- _Safe_unordered_sequence_base::
+ _Safe_unordered_container_base::
_M_detach_all()
{
__gnu_cxx::__scoped_lock sentry(_M_get_mutex());
@@ -448,17 +448,17 @@
}
void
- _Safe_unordered_sequence_base::
- _M_swap(_Safe_unordered_sequence_base& __x)
+ _Safe_unordered_container_base::
+ _M_swap(_Safe_unordered_container_base& __x)
{
-// We need to lock both sequences to swap
+// We need to lock