From bf4681da30e2892aabed7ad3ffdbe55d1c6c4557 Mon Sep 17 00:00:00 2001 From: Evan Nemerson Date: Sun, 11 May 2014 20:18:53 -0700 Subject: 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 39f85a45c..377aaaa2f 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 edcc9055e..1835a47e6 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 acae7cd66..d6d439213 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 9c992b6ac..d0fe7d5e0 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, -- cgit v1.2.1