diff options
author | Paolo Carlini <pcarlini@suse.de> | 2004-03-19 16:08:15 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2004-03-19 16:08:15 +0000 |
commit | 59d35672142c7b555a1722f57e853fb1dbc51e84 (patch) | |
tree | de59f8bca611339f02f5f77e8769f5456ca5c239 /libstdc++-v3/include/ext/ropeimpl.h | |
parent | 30f3b32b41622bca1828edc4acd0a4849408cf56 (diff) | |
download | gcc-59d35672142c7b555a1722f57e853fb1dbc51e84.zip gcc-59d35672142c7b555a1722f57e853fb1dbc51e84.tar.gz gcc-59d35672142c7b555a1722f57e853fb1dbc51e84.tar.bz2 |
re PR libstdc++/14648 (rope is broken (regression))
2004-03-19 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/14648
* include/ext/ropeimpl.h (rope<>::_S_apply_to_pieces): Fix
memory allocation/deallocation calls.
* testsuite/ext/14648.cc: New.
From-SVN: r79687
Diffstat (limited to 'libstdc++-v3/include/ext/ropeimpl.h')
-rw-r--r-- | libstdc++-v3/include/ext/ropeimpl.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libstdc++-v3/include/ext/ropeimpl.h b/libstdc++-v3/include/ext/ropeimpl.h index 0e545fe..b4c5f3e 100644 --- a/libstdc++-v3/include/ext/ropeimpl.h +++ b/libstdc++-v3/include/ext/ropeimpl.h @@ -874,15 +874,15 @@ bool rope<_CharT, _Alloc>::_S_apply_to_pieces( size_t __len = __end - __begin; bool __result; _CharT* __buffer = - (_CharT*)_Alloc::allocate(__len * sizeof(_CharT)); + (_CharT*)_Alloc().allocate(__len * sizeof(_CharT)); try { (*(__f->_M_fn))(__begin, __len, __buffer); __result = __c(__buffer, __len); - _Alloc::deallocate(__buffer, __len * sizeof(_CharT)); + _Alloc().deallocate(__buffer, __len * sizeof(_CharT)); } catch(...) { - _Alloc::deallocate(__buffer, __len * sizeof(_CharT)); + _Alloc().deallocate(__buffer, __len * sizeof(_CharT)); __throw_exception_again; } return __result; |