openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/glib-2.0/1_2.60.3-r0/glib-2.60.3/gio/goutputstream.c
gssize g_output_stream_write_bytes(GOutputStream* stream, GBytes* bytes,
                                   GCancellable* cancellable, GError** error)
{
    gsize size;
    gconstpointer data;

    data = g_bytes_get_data(bytes, &size);

    return g_output_stream_write(stream, data, size, cancellable, error);
}
/**
 * g_output_stream_write_bytes:
 * @stream: a #GOutputStream.
 * @bytes: the #GBytes to write
 * @cancellable: (nullable): optional cancellable object
 * @error: location to store the error occurring, or %NULL to ignore
 *
 * A wrapper function for g_output_stream_write() which takes a
 * #GBytes as input.  This can be more convenient for use by language
 * bindings or in other cases where the refcounted nature of #GBytes
 * is helpful over a bare pointer interface.
 *
 * However, note that this function may still perform partial writes,
 * just like g_output_stream_write().  If that occurs, to continue
 * writing, you will need to create a new #GBytes containing just the
 * remaining bytes, using g_bytes_new_from_bytes(). Passing the same
 * #GBytes instance multiple times potentially can result in duplicated
 * data in the output stream.
 *
 * Returns: Number of bytes written, or -1 on error
 **/


A wrapper function for g_output_stream_write() which takes a
#GBytes as input.  This can be more convenient for use by language
bindings or in other cases where the refcounted nature of #GBytes
is helpful over a bare pointer interface.

However, note that this function may still perform partial writes,
just like g_output_stream_write().  If that occurs, to continue
writing, you will need to create a new #GBytes containing just the
remaining bytes, using g_bytes_new_from_bytes(). Passing the same
#GBytes instance multiple times potentially can result in duplicated
data in the output stream.

Number of bytes written, or -1 on error
A wrapper function for g_output_stream_write () which takes a #GBytes as input . This can be more convenient for use by language bindings or in other cases where the refcounted nature of #GBytes is helpful over a bare pointer interface . However note that this function may still perform partial writes just like g_output_stream_write () . If that occurs to continue writing you will need to create a new #GBytes containing just the remaining bytes using g_bytes_new_from_bytes () . Passing the same #GBytes instance multiple times potentially can result in duplicated data in the output stream . Number of bytes written or - 1 on error
gssize g_output_stream_write_bytes(GOutputStream* stream, GBytes* bytes,
                                   GCancellable* cancellable, GError** error)
{
    gsize size;
    gconstpointer data;
    data = g_bytes_get_data(bytes, &size);
    return g_output_stream_write(stream, data, size, cancellable, error);
}
gssize g_output_stream_write_bytes ( GOutputStream * stream , GBytes * bytes , GCancellable * cancellable , GError * * error ) { gsize size ; gconstpointer data ; data = g_bytes_get_data ( bytes , & size ) ; return g_output_stream_write ( stream , data , size , cancellable , error ) ; }
g_output_stream_write_bytes:
 @stream: a #GOutputStream.
g_output_stream_write_bytes : @stream : a #GOutputStream .