|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r57608 - in trunk/boost/iostreams: . detail detail/streambuf
From: daniel_james_at_[hidden]
Date: 2009-11-12 14:19:36
Author: danieljames
Date: 2009-11-12 14:19:35 EST (Thu, 12 Nov 2009)
New Revision: 57608
URL: http://svn.boost.org/trac/boost/changeset/57608
Log:
Hopefully fix #2894.
By Richard Smith
Text files modified:
trunk/boost/iostreams/chain.hpp | 24 ++++++++++++++----------
trunk/boost/iostreams/detail/push_params.hpp | 2 +-
trunk/boost/iostreams/detail/streambuf/direct_streambuf.hpp | 6 ++++--
trunk/boost/iostreams/detail/streambuf/indirect_streambuf.hpp | 2 +-
4 files changed, 20 insertions(+), 14 deletions(-)
Modified: trunk/boost/iostreams/chain.hpp
==============================================================================
--- trunk/boost/iostreams/chain.hpp (original)
+++ trunk/boost/iostreams/chain.hpp 2009-11-12 14:19:35 EST (Thu, 12 Nov 2009)
@@ -150,17 +150,20 @@
// Sets the size of the buffer created for the devices to be added to this
// chain. Does not affect the size of the buffer for devices already
// added.
- void set_device_buffer_size(int n) { pimpl_->device_buffer_size_ = n; }
+ void set_device_buffer_size(std::streamsize n)
+ { pimpl_->device_buffer_size_ = n; }
// Sets the size of the buffer created for the filters to be added
// to this chain. Does not affect the size of the buffer for filters already
// added.
- void set_filter_buffer_size(int n) { pimpl_->filter_buffer_size_ = n; }
+ void set_filter_buffer_size(std::streamsize n)
+ { pimpl_->filter_buffer_size_ = n; }
// Sets the size of the putback buffer for filters and devices to be added
// to this chain. Does not affect the size of the buffer for filters or
// devices already added.
- void set_pback_size(int n) { pimpl_->pback_size_ = n; }
+ void set_pback_size(std::streamsize n)
+ { pimpl_->pback_size_ = n; }
//----------Device interface----------------------------------------------//
@@ -227,7 +230,8 @@
bool strict_sync();
private:
template<typename T>
- void push_impl(const T& t, int buffer_size = -1, int pback_size = -1)
+ void push_impl(const T& t, std::streamsize buffer_size = -1,
+ std::streamsize pback_size = -1)
{
typedef typename iostreams::category_of<T>::type category;
typedef typename unwrap_ios<T>::type component_type;
@@ -362,12 +366,12 @@
flags_ &= ~f_complete;
flags_ &= ~f_open;
}
- list_type links_;
- client_type* client_;
- int device_buffer_size_,
- filter_buffer_size_,
- pback_size_;
- int flags_;
+ list_type links_;
+ client_type* client_;
+ std::streamsize device_buffer_size_,
+ filter_buffer_size_,
+ pback_size_;
+ int flags_;
};
friend struct chain_impl;
Modified: trunk/boost/iostreams/detail/push_params.hpp
==============================================================================
--- trunk/boost/iostreams/detail/push_params.hpp (original)
+++ trunk/boost/iostreams/detail/push_params.hpp 2009-11-12 14:19:35 EST (Thu, 12 Nov 2009)
@@ -13,7 +13,7 @@
#endif
#define BOOST_IOSTREAMS_PUSH_PARAMS() \
- , int buffer_size = -1 , int pback_size = -1 \
+ , std::streamsize buffer_size = -1 , std::streamsize pback_size = -1 \
/**/
#define BOOST_IOSTREAMS_PUSH_ARGS() , buffer_size, pback_size
Modified: trunk/boost/iostreams/detail/streambuf/direct_streambuf.hpp
==============================================================================
--- trunk/boost/iostreams/detail/streambuf/direct_streambuf.hpp (original)
+++ trunk/boost/iostreams/detail/streambuf/direct_streambuf.hpp 2009-11-12 14:19:35 EST (Thu, 12 Nov 2009)
@@ -56,7 +56,8 @@
char_type, traits_type
) streambuf_type;
public: // stream needs access.
- void open(const T& t, int buffer_size, int pback_size);
+ void open(const T& t, std::streamsize buffer_size,
+ std::streamsize pback_size);
bool is_open() const;
void close();
bool auto_close() const { return auto_close_; }
@@ -112,7 +113,8 @@
{ this->set_true_eof(true); }
template<typename T, typename Tr>
-void direct_streambuf<T, Tr>::open(const T& t, int, int)
+void direct_streambuf<T, Tr>::open
+ (const T& t, std::streamsize, std::streamsize)
{
storage_.reset(t);
init_input(category());
Modified: trunk/boost/iostreams/detail/streambuf/indirect_streambuf.hpp
==============================================================================
--- trunk/boost/iostreams/detail/streambuf/indirect_streambuf.hpp (original)
+++ trunk/boost/iostreams/detail/streambuf/indirect_streambuf.hpp 2009-11-12 14:19:35 EST (Thu, 12 Nov 2009)
@@ -152,7 +152,7 @@
template<typename T, typename Tr, typename Alloc, typename Mode>
void indirect_streambuf<T, Tr, Alloc, Mode>::open
- (const T& t, int buffer_size, int pback_size)
+ (const T& t, std::streamsize buffer_size, std::streamsize pback_size)
{
using namespace std;
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk