[glibmm/glibmm-2-26] BufferedInputStream, BufferedOutputStream: Correct property name.



commit 888a1da5403972bec46b87ef9a1f631822ba8cca
Author: Murray Cumming <murrayc murrayc com>
Date:   Wed Jan 5 22:16:16 2011 +0100

    BufferedInputStream, BufferedOutputStream: Correct property name.
    
    * gio/src/bufferedinputstream.[hg|ccg]
    * gio/src/bufferedoutputstream.[hg|ccg]: When using create_sized(), it
    tried to set the wrong property. Renaming the parameter from size to
    buffer_size fixes this.
    
    Bug #638616 (Michael Edwards)

 ChangeLog                        |   11 +++++++++++
 gio/src/bufferedinputstream.ccg  |    4 ++--
 gio/src/bufferedinputstream.hg   |    9 +++++++--
 gio/src/bufferedoutputstream.ccg |    3 ++-
 gio/src/bufferedoutputstream.hg  |    9 +++++++--
 5 files changed, 29 insertions(+), 7 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 058d620..ae75fb5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2011-01-05  Murray Cumming  <murrayc murrayc com>
+
+	BufferedInputStream, BufferedOutputStream: Correct property name.
+
+	* gio/src/bufferedinputstream.[hg|ccg]
+	* gio/src/bufferedoutputstream.[hg|ccg]: When using create_sized(), it 
+	tried to set the wrong property. Renaming the parameter from size to 
+	buffer_size fixes this.
+	
+	Bug #638616 (Michael Edwards)
+
 2010-10-18  José Alburquerque  <jaalburqu svn gnome org>
 
 	glibmm: ustring: Restore last block removed by #ifdef removal script.
diff --git a/gio/src/bufferedinputstream.ccg b/gio/src/bufferedinputstream.ccg
index cba9383..ab4cd41 100644
--- a/gio/src/bufferedinputstream.ccg
+++ b/gio/src/bufferedinputstream.ccg
@@ -22,9 +22,9 @@
 
 namespace Gio
 {
-Glib::RefPtr<BufferedInputStream> BufferedInputStream::create_sized(const Glib::RefPtr<InputStream>& base_stream, gsize size)
+Glib::RefPtr<BufferedInputStream> BufferedInputStream::create_sized(const Glib::RefPtr<InputStream>& base_stream, gsize buffer_size)
 {
-    return Glib::RefPtr<Gio::BufferedInputStream>(new BufferedInputStream(base_stream, size));
+  return Glib::RefPtr<Gio::BufferedInputStream>(new BufferedInputStream(base_stream, buffer_size));
 }
 
 gssize BufferedInputStream::fill(gssize count)
diff --git a/gio/src/bufferedinputstream.hg b/gio/src/bufferedinputstream.hg
index 85c86a7..f8b07b8 100644
--- a/gio/src/bufferedinputstream.hg
+++ b/gio/src/bufferedinputstream.hg
@@ -47,10 +47,15 @@ class BufferedInputStream : public Gio::FilterInputStream
   _CLASS_GOBJECT(BufferedInputStream, GBufferedInputStream, G_BUFFERED_INPUT_STREAM, Gio::FilterInputStream, GFilterInputStream)
 protected:
   _WRAP_CTOR(BufferedInputStream(const Glib::RefPtr<InputStream>& base_stream), g_buffered_input_stream_new)
-  _WRAP_CTOR(BufferedInputStream(const Glib::RefPtr<InputStream>& base_stream, gsize size), g_buffered_input_stream_new_sized)
+  
+  //Note that we rename the size parameter to buffer_size because that is the actual name of the property.
+  _WRAP_CTOR(BufferedInputStream(const Glib::RefPtr<InputStream>& base_stream, gsize buffer_size), g_buffered_input_stream_new_sized)
+
 public:
   _WRAP_CREATE(const Glib::RefPtr<InputStream>& base_stream)
-  static Glib::RefPtr<BufferedInputStream> create_sized(const Glib::RefPtr<InputStream>& base_stream, gsize size);
+  
+  //TODO: Documentation
+  static Glib::RefPtr<BufferedInputStream> create_sized(const Glib::RefPtr<InputStream>& base_stream, gsize buffer_size);
 
   _WRAP_METHOD(gsize get_buffer_size() const, g_buffered_input_stream_get_buffer_size)
   _WRAP_METHOD(void set_buffer_size(gsize size), g_buffered_input_stream_set_buffer_size)
diff --git a/gio/src/bufferedoutputstream.ccg b/gio/src/bufferedoutputstream.ccg
index 65ebeaf..c270899 100644
--- a/gio/src/bufferedoutputstream.ccg
+++ b/gio/src/bufferedoutputstream.ccg
@@ -22,9 +22,10 @@
 
 namespace Gio
 {
+
 Glib::RefPtr<BufferedOutputStream> BufferedOutputStream::create_sized(const Glib::RefPtr<OutputStream>& base_stream, gsize size)
 {
-    return Glib::RefPtr<Gio::BufferedOutputStream>(new BufferedOutputStream(base_stream, size));
+  return Glib::RefPtr<Gio::BufferedOutputStream>(new BufferedOutputStream(base_stream, size));
 }
 
 }   // namespace Gio
diff --git a/gio/src/bufferedoutputstream.hg b/gio/src/bufferedoutputstream.hg
index e9ec64f..f561c82 100644
--- a/gio/src/bufferedoutputstream.hg
+++ b/gio/src/bufferedoutputstream.hg
@@ -43,10 +43,15 @@ class BufferedOutputStream : public Gio::FilterOutputStream
   _CLASS_GOBJECT(BufferedOutputStream, GBufferedOutputStream, G_BUFFERED_OUTPUT_STREAM, Gio::FilterOutputStream, GFilterOutputStream)
 protected:
   _WRAP_CTOR(BufferedOutputStream(const Glib::RefPtr<OutputStream>& base_stream), g_buffered_output_stream_new)
-  _WRAP_CTOR(BufferedOutputStream(const Glib::RefPtr<OutputStream>& base_stream, gsize size), g_buffered_output_stream_new_sized)
+  
+  //Note that we rename the size parameter to buffer_size because that is the actual name of the property.
+  _WRAP_CTOR(BufferedOutputStream(const Glib::RefPtr<OutputStream>& base_stream, gsize buffer_size), g_buffered_output_stream_new_sized)
+
 public:
   _WRAP_CREATE(const Glib::RefPtr<OutputStream>& base_stream)
-  static Glib::RefPtr<BufferedOutputStream> create_sized(const Glib::RefPtr<OutputStream>& base_stream, gsize size);
+  
+  //TODO: Documentation
+  static Glib::RefPtr<BufferedOutputStream> create_sized(const Glib::RefPtr<OutputStream>& base_stream, gsize buffer_size);
 
   _WRAP_METHOD(gsize get_buffer_size() const, g_buffered_output_stream_get_buffer_size)
   _WRAP_METHOD(void set_buffer_size(gsize size), g_buffered_output_stream_set_buffer_size)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]