diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2013-12-08 13:57:51 +0100 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2013-12-08 13:57:51 +0100 |
commit | 1328045bb953e40b1978a43f180da119dc490dc3 (patch) | |
tree | 4f07609d4ff2cf55ac149c6bdf74c5f154c16040 /gir/glib-2.0.c | |
parent | 9b46f283e25f6ce06f0e8926120db5fac3ddf418 (diff) | |
download | gobject-introspection-1328045bb953e40b1978a43f180da119dc490dc3.tar.gz |
Update glib annotations from git master
Diffstat (limited to 'gir/glib-2.0.c')
-rw-r--r-- | gir/glib-2.0.c | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/gir/glib-2.0.c b/gir/glib-2.0.c index c0c7febf..885afd01 100644 --- a/gir/glib-2.0.c +++ b/gir/glib-2.0.c @@ -100,8 +100,8 @@ /** * GBytes: * - * A simple refcounted data type representing an immutable byte sequence - * from an unspecified origin. + * A simple refcounted data type representing an immutable sequence of zero or + * more bytes from an unspecified origin. * * The purpose of a #GBytes is to keep the memory region that it holds * alive for as long as anyone holds a reference to the bytes. When @@ -11187,8 +11187,12 @@ * * This function will always return the same pointer for a given #GBytes. * - * Returns: (transfer none) (array length=size) (type guint8): a pointer to the - * byte data + * %NULL may be returned if @size is 0. This is not guaranteed, as the #GBytes + * may represent an empty string with @data non-%NULL and @size as 0. %NULL will + * not be returned if @size is non-zero. + * + * Returns: (transfer none) (array length=size) (type guint8) (allow-none): a pointer to the + * byte data, or %NULL * Since: 2.32 */ @@ -11222,13 +11226,13 @@ /** * g_bytes_new: - * @data: (transfer none) (array length=size) (element-type guint8): + * @data: (transfer none) (array length=size) (element-type guint8) (allow-none): * the data to be used for the bytes * @size: the size of @data * * Creates a new #GBytes from @data. * - * @data is copied. + * @data is copied. If @size is 0, @data may be %NULL. * * Returns: (transfer full): a new #GBytes * Since: 2.32 @@ -11254,13 +11258,14 @@ /** * g_bytes_new_static: (skip) - * @data: (transfer full) (array length=size) (element-type guint8): + * @data: (transfer full) (array length=size) (element-type guint8) (allow-none): * the data to be used for the bytes * @size: the size of @data * * Creates a new #GBytes from static data. * - * @data must be static (ie: never modified or freed). + * @data must be static (ie: never modified or freed). It may be %NULL if @size + * is 0. * * Returns: (transfer full): a new #GBytes * Since: 2.32 @@ -11269,7 +11274,7 @@ /** * g_bytes_new_take: - * @data: (transfer full) (array length=size) (element-type guint8): + * @data: (transfer full) (array length=size) (element-type guint8) (allow-none): * the data to be used for the bytes * @size: the size of @data * @@ -11284,6 +11289,8 @@ * For creating #GBytes with memory from other allocators, see * g_bytes_new_with_free_func(). * + * @data may be %NULL if @size is 0. + * * Returns: (transfer full): a new #GBytes * Since: 2.32 */ @@ -11291,7 +11298,7 @@ /** * g_bytes_new_with_free_func: - * @data: (array length=size): the data to be used for the bytes + * @data: (array length=size) (allow-none): the data to be used for the bytes * @size: the size of @data * @free_func: the function to call to release the data * @user_data: data to pass to @free_func @@ -11304,6 +11311,8 @@ * @data must not be modified after this call is made until @free_func has * been called to indicate that the bytes is no longer in use. * + * @data may be %NULL if @size is 0. + * * Returns: (transfer full): a new #GBytes * Since: 2.32 */ |