This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [FYI] Forward movement on 9404
- From: Benjamin Kosnik <bkoz at redhat dot com>
- To: Paolo Carlini <pcarlini at unitus dot it>
- Cc: libstdc++ at gcc dot gnu dot org, ncm at cantrip dot org
- Date: Fri, 21 Feb 2003 18:07:26 -0600
- Subject: Re: [FYI] Forward movement on 9404
- References: <3E56B31D.3050003@unitus.it>
>in case someone would like to help on testing/adding comments and
>what else, before taking a little bit of sleep I'm sending my current
>best attempt at fixing 9404 in a clean way, i.e., implementing the
>more general points of Nathan's outline for a post-DR169 asset.
Great job.
>I'm quite happy with it! Of course the regression tests are ok and
>everything seems quite clean: overflow now happens _always_ when it
>should (pptr == epptr) both for filestreams and stringstreams.
Absolutely fantastic.
>I would appreciate, in particular, some help on the legacy <strstream>
>bits, which must be broken right now.
I think <strstream> should be separate from this, and should not hold
this patch up.
A minor nit:
+ if (_M_out_buf_size())
__ret = this->sputc(traits_type::to_char_type(__c));
else if (__len <= _M_string.max_size())
{
// Force-allocate, re-sync.
_M_string = this->str();
_M_string.reserve(__len);
- this->_M_buf_size = __len;
+ this->_M_buf_size = _M_string.capacity();
_M_really_sync(this->_M_in_cur - this->_M_in_beg,
this->_M_out_cur - this->_M_out_beg);
__ret = this->sputc(traits_type::to_char_type(__c));
is there a way to coalesce these
__ret = this->sputc(traits_type::to_char_type(__c));
lines?
-benjamin