/* The default state of the channel is buffered.  */
void g_io_channel_set_buffered(GIOChannel *channel, gboolean buffered)
/* The default state of the channel is buffered.  */
void g_io_channel_set_buffered(GIOChannel *channel, gboolean buffered)
{
  g_return_if_fail (channel != NULL);
  if (channel->encoding != NULL)
    {
      g_warning ("Need to have NULL encoding to set the buffering state of the "
                 "channel.\n");
      return;
    }
  g_return_if_fail (!channel->read_buf || channel->read_buf->len == 0);
  g_return_if_fail (!channel->write_buf || channel->write_buf->len == 0);
  channel->use_buffer = buffered;
}