X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gio%2Fgbufferedinputstream.c;h=3b147d4290903a9fb8d3532c5f98b6765faba32c;hb=8df2cca08a5c06286303b39a34121c7e6925bf15;hp=20131184b6ee0b78fd58b833989767bce0081743;hpb=669505e354a843efb2e198d4b56e310fa6a69b9a;p=platform%2Fupstream%2Fglib.git
diff --git a/gio/gbufferedinputstream.c b/gio/gbufferedinputstream.c
index 2013118..3b147d4 100644
--- a/gio/gbufferedinputstream.c
+++ b/gio/gbufferedinputstream.c
@@ -14,9 +14,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General
- * Public License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Public License along with this library; if not, see .
*
* Author: Christian Kellner
*/
@@ -129,13 +127,12 @@ static gboolean g_buffered_input_stream_truncate (GSeekable *se
GCancellable *cancellable,
GError **error);
-static void g_buffered_input_stream_finalize (GObject *object);
-
static void compact_buffer (GBufferedInputStream *stream);
G_DEFINE_TYPE_WITH_CODE (GBufferedInputStream,
g_buffered_input_stream,
G_TYPE_FILTER_INPUT_STREAM,
+ G_ADD_PRIVATE (GBufferedInputStream)
G_IMPLEMENT_INTERFACE (G_TYPE_SEEKABLE,
g_buffered_input_stream_seekable_iface_init))
@@ -146,8 +143,6 @@ g_buffered_input_stream_class_init (GBufferedInputStreamClass *klass)
GInputStreamClass *istream_class;
GBufferedInputStreamClass *bstream_class;
- g_type_class_add_private (klass, sizeof (GBufferedInputStreamPrivate));
-
object_class = G_OBJECT_CLASS (klass);
object_class->get_property = g_buffered_input_stream_get_property;
object_class->set_property = g_buffered_input_stream_set_property;
@@ -317,9 +312,7 @@ g_buffered_input_stream_seekable_iface_init (GSeekableIface *iface)
static void
g_buffered_input_stream_init (GBufferedInputStream *stream)
{
- stream->priv = G_TYPE_INSTANCE_GET_PRIVATE (stream,
- G_TYPE_BUFFERED_INPUT_STREAM,
- GBufferedInputStreamPrivate);
+ stream->priv = g_buffered_input_stream_get_instance_private (stream);
}
@@ -461,8 +454,7 @@ async_fill_callback_wrapper (GObject *source_object,
* g_buffered_input_stream_fill_async:
* @stream: a #GBufferedInputStream
* @count: the number of bytes that will be read from the stream
- * @io_priority: the I/O priority
- * of the request
+ * @io_priority: the [I/O priority][io-priority] of the request
* @cancellable: (allow-none): optional #GCancellable object
* @callback: (scope async): a #GAsyncReadyCallback
* @user_data: (closure): a #gpointer
@@ -644,7 +636,7 @@ compact_buffer (GBufferedInputStream *stream)
current_size = priv->end - priv->pos;
- g_memmove (priv->buffer, priv->buffer + priv->pos, current_size);
+ memmove (priv->buffer, priv->buffer + priv->pos, current_size);
priv->pos = 0;
priv->end = current_size;