* 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 <http://www.gnu.org/licenses/>.
*
* Author: Christian Kellner <gicmo@gnome.org>
*/
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))
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;
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);
}
* g_buffered_input_stream_fill_async:
* @stream: a #GBufferedInputStream
* @count: the number of bytes that will be read from the stream
- * @io_priority: the <link linkend="io-priority">I/O priority</link>
- * 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
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;