[gdk-pixbuf] Add some missing nullability annotations.
- From: Evan Nemerson <evann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdk-pixbuf] Add some missing nullability annotations.
- Date: Sat, 17 May 2014 03:20:58 +0000 (UTC)
commit bf4681da30e2892aabed7ad3ffdbe55d1c6c4557
Author: Evan Nemerson <evan nemerson com>
Date: Sun May 11 20:18:53 2014 -0700
Add some missing nullability annotations.
https://bugzilla.gnome.org/show_bug.cgi?id=730161
gdk-pixbuf/gdk-pixbuf-io.c | 12 +++++++-----
gdk-pixbuf/gdk-pixbuf-loader.c | 5 +++--
gdk-pixbuf/gdk-pixbuf-scale.c | 8 ++++----
gdk-pixbuf/gdk-pixdata.c | 5 +++--
4 files changed, 17 insertions(+), 13 deletions(-)
---
diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c
index 39f85a4..377aaaa 100644
--- a/gdk-pixbuf/gdk-pixbuf-io.c
+++ b/gdk-pixbuf/gdk-pixbuf-io.c
@@ -1867,14 +1867,16 @@ info_cb (GdkPixbufLoader *loader,
/**
* gdk_pixbuf_get_file_info:
* @filename: The name of the file to identify.
- * @width: (out): Return location for the width of the image, or %NULL
- * @height: (out): Return location for the height of the image, or %NULL
+ * @width: (optional) (out): Return location for the width of the
+ * image, or %NULL
+ * @height: (optional) (out): Return location for the height of the
+ * image, or %NULL
*
* Parses an image file far enough to determine its format and size.
*
- * Returns: (transfer none): A #GdkPixbufFormat describing the image
- * format of the file or %NULL if the image format wasn't
- * recognized. The return value is owned by GdkPixbuf and should
+ * Returns: (nullable) (transfer none): A #GdkPixbufFormat describing
+ * the image format of the file or %NULL if the image format wasn't
+ * recognized. The return value is owned by #GdkPixbuf and should
* not be freed.
*
* Since: 2.4
diff --git a/gdk-pixbuf/gdk-pixbuf-loader.c b/gdk-pixbuf/gdk-pixbuf-loader.c
index edcc905..1835a47 100644
--- a/gdk-pixbuf/gdk-pixbuf-loader.c
+++ b/gdk-pixbuf/gdk-pixbuf-loader.c
@@ -857,8 +857,9 @@ gdk_pixbuf_loader_close (GdkPixbufLoader *loader,
* Obtains the available information about the format of the
* currently loading image file.
*
- * Returns: (transfer none): A #GdkPixbufFormat or %NULL. The return
- * value is owned by GdkPixbuf and should not be freed.
+ * Returns: (nullable) (transfer none): A #GdkPixbufFormat or
+ * %NULL. The return value is owned by GdkPixbuf and should not be
+ * freed.
*
* Since: 2.2
*/
diff --git a/gdk-pixbuf/gdk-pixbuf-scale.c b/gdk-pixbuf/gdk-pixbuf-scale.c
index acae7cd..d6d4392 100644
--- a/gdk-pixbuf/gdk-pixbuf-scale.c
+++ b/gdk-pixbuf/gdk-pixbuf-scale.c
@@ -383,8 +383,8 @@ gdk_pixbuf_composite_color_simple (const GdkPixbuf *src,
* Rotates a pixbuf by a multiple of 90 degrees, and returns the
* result in a new pixbuf.
*
- * Returns: (transfer full): the new #GdkPixbuf, or %NULL if not enough memory could be
- * allocated for it.
+ * Returns: (nullable) (transfer full): the new #GdkPixbuf, or %NULL
+ * if not enough memory could be allocated for it.
*
* Since: 2.6
*/
@@ -476,8 +476,8 @@ gdk_pixbuf_rotate_simple (const GdkPixbuf *src,
* Flips a pixbuf horizontally or vertically and returns the
* result in a new pixbuf.
*
- * Returns: (transfer full): the new #GdkPixbuf, or %NULL if not enough memory could be
- * allocated for it.
+ * Returns: (nullable) (transfer full): the new #GdkPixbuf, or %NULL
+ * if not enough memory could be allocated for it.
*
* Since: 2.6
*/
diff --git a/gdk-pixbuf/gdk-pixdata.c b/gdk-pixbuf/gdk-pixdata.c
index 9c992b6..d0fe7d5 100644
--- a/gdk-pixbuf/gdk-pixdata.c
+++ b/gdk-pixbuf/gdk-pixdata.c
@@ -319,8 +319,9 @@ free_buffer (guchar *pixels, gpointer data)
* pixel data is run-length encoded into newly-allocated memory and a
* pointer to that memory is returned.
*
- * Returns: If @ure_rle is %TRUE, a pointer to the newly-allocated memory
- * for the run-length encoded pixel data, otherwise %NULL.
+ * Returns: (nullable): If @use_rle is %TRUE, a pointer to the
+ * newly-allocated memory for the run-length encoded pixel data,
+ * otherwise %NULL.
**/
gpointer
gdk_pixdata_from_pixbuf (GdkPixdata *pixdata,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]