[FYI] Forward movement on 9404
Benjamin Kosnik
bkoz@redhat.com
Sat Feb 22 00:07:00 GMT 2003
>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
More information about the Libstdc++
mailing list