/* Returns: (transfer full): a new immutable #GBytes representing same byte data that was in the array  */
GBytes* g_byte_array_free_to_bytes(GByteArray *array)
/* Returns: (transfer full): a new immutable #GBytes representing same byte data that was in the array  */
GBytes* g_byte_array_free_to_bytes(GByteArray *array)
{
  gsize length;
  g_return_val_if_fail (array != NULL, NULL);
  length = array->len;
  return g_bytes_new_take (g_byte_array_free (array, FALSE), length);
}