* 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>
*/
G_DEFINE_TYPE_WITH_CODE (GBufferedOutputStream,
g_buffered_output_stream,
G_TYPE_FILTER_OUTPUT_STREAM,
+ G_ADD_PRIVATE (GBufferedOutputStream)
G_IMPLEMENT_INTERFACE (G_TYPE_SEEKABLE,
g_buffered_output_stream_seekable_iface_init))
{
GObjectClass *object_class;
GOutputStreamClass *ostream_class;
-
- g_type_class_add_private (klass, sizeof (GBufferedOutputStreamPrivate));
object_class = G_OBJECT_CLASS (klass);
object_class->get_property = g_buffered_output_stream_get_property;
static void
g_buffered_output_stream_init (GBufferedOutputStream *stream)
{
- stream->priv = G_TYPE_INSTANCE_GET_PRIVATE (stream,
- G_TYPE_BUFFERED_OUTPUT_STREAM,
- GBufferedOutputStreamPrivate);
-
+ stream->priv = g_buffered_output_stream_get_instance_private (stream);
}
static void
count = priv->pos - bytes_written;
if (count > 0)
- g_memmove (priv->buffer, priv->buffer + bytes_written, count);
+ memmove (priv->buffer, priv->buffer + bytes_written, count);
priv->pos -= bytes_written;